PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "Breeds" (
"breed_code" VARCHAR(10),
"breed_name" VARCHAR(80),
PRIMARY KEY ("breed_code")
);

CREATE TABLE "Dogs" (
"dog_id" INT,
"abandoned_yn" VARCHAR(1),
"name" VARCHAR(50),
"age" VARCHAR(20),
"weight" VARCHAR(20),
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Owners" (
"owner_id" INT,
"email_address" VARCHAR(50),
PRIMARY KEY ("owner_id")
);

CREATE TABLE "Sizes" (
"size_code" VARCHAR(10),
"size_description" VARCHAR(80),
PRIMARY KEY ("size_code")
);





INSERT INTO "Breeds" VALUES ("BD001", "Labrador Retriever");
INSERT INTO "Breeds" VALUES ("BD002", "German Shepherd");
INSERT INTO "Breeds" VALUES ("BD003", "Beagle");
INSERT INTO "Breeds" VALUES ("BD004", "Bulldog");
INSERT INTO "Breeds" VALUES ("BD005", "Poodle");
INSERT INTO "Dogs" VALUES ("1", "1", "Max", "5", "20");
INSERT INTO "Dogs" VALUES ("2", "0", "Bella", "3", "15");
INSERT INTO "Dogs" VALUES ("3", "1", "Charlie", "0", "0");
INSERT INTO "Dogs" VALUES ("4", "1", "Lucy", "7", "null");
INSERT INTO "Dogs" VALUES ("5", "0", "Daisy", "null", "10");
INSERT INTO "Dogs" VALUES ("6", "1", "Molly", "2", "8");
INSERT INTO "Dogs" VALUES ("7", "0", "Bailey", "4", "12");
INSERT INTO "Dogs" VALUES ("8", "1", "Rocky", "null", "null");
INSERT INTO "Dogs" VALUES ("9", "1", "Sadie", "10", "25");
INSERT INTO "Dogs" VALUES ("10", "0", "Toby", "6", "18");
INSERT INTO "Owners" VALUES ("1", "owner1@example.com");
INSERT INTO "Owners" VALUES ("2", "owner2@example.com");
INSERT INTO "Owners" VALUES ("3", "owner3@example.com");
INSERT INTO "Owners" VALUES ("4", "owner4@example.com");
INSERT INTO "Owners" VALUES ("5", "owner5@example.com");
INSERT INTO "Sizes" VALUES ("SZ1", "Small");
INSERT INTO "Sizes" VALUES ("SZ2", "Medium");
INSERT INTO "Sizes" VALUES ("SZ3", "Large");
INSERT INTO "Sizes" VALUES ("SZ4", "Extra Large");