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) UNIQUE,
"breed_name" VARCHAR(80),
PRIMARY KEY ("breed_code")
);

CREATE TABLE "Dogs" (
"dog_id" INT,
"breed_code" VARCHAR(10),
"name" VARCHAR(50),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("breed_code") REFERENCES "Breeds"("breed_code")
);

CREATE TABLE "Owners" (
"owner_id" INT,
"first_name" 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 ("LAB", "Labrador Retriever");
INSERT INTO "Breeds" VALUES ("GER", "German Shepherd");
INSERT INTO "Breeds" VALUES ("GOLD", "Golden Retriever");
INSERT INTO "Breeds" VALUES ("POOD", "Poodle");
INSERT INTO "Breeds" VALUES ("BEAG", "Beagle");
INSERT INTO "Breeds" VALUES ("BULL", "Bulldog");
INSERT INTO "Breeds" VALUES ("DACH", "Dachshund");
INSERT INTO "Breeds" VALUES ("ROTT", "Rottweiler");
INSERT INTO "Breeds" VALUES ("YORK", "Yorkshire Terrier");
INSERT INTO "Breeds" VALUES ("BOX", "Boxer");
INSERT INTO "Dogs" VALUES ("1", "LAB", "Buddy");
INSERT INTO "Dogs" VALUES ("2", "LAB", "Bella");
INSERT INTO "Dogs" VALUES ("3", "GER", "Max");
INSERT INTO "Dogs" VALUES ("4", "GOLD", "Lucy");
INSERT INTO "Dogs" VALUES ("5", "LAB", "Charlie");
INSERT INTO "Dogs" VALUES ("6", "POOD", "Daisy");
INSERT INTO "Dogs" VALUES ("7", "LAB", "Cooper");
INSERT INTO "Dogs" VALUES ("8", "BEAG", "Molly");
INSERT INTO "Dogs" VALUES ("9", "GER", "Rocky");
INSERT INTO "Dogs" VALUES ("10", "GOLD", "Sadie");
INSERT INTO "Dogs" VALUES ("11", "LAB", "Duke");
INSERT INTO "Dogs" VALUES ("12", "LAB", "Luna");
INSERT INTO "Dogs" VALUES ("13", "BULL", "Winston");
INSERT INTO "Dogs" VALUES ("14", "DACH", "Oscar");
INSERT INTO "Dogs" VALUES ("15", "ROTT", "Bear");
INSERT INTO "Dogs" VALUES ("16", "YORK", "Chloe");
INSERT INTO "Dogs" VALUES ("17", "BOX", "Apollo");
INSERT INTO "Dogs" VALUES ("18", "LAB", "Zoe");
INSERT INTO "Dogs" VALUES ("19", "GER", "Shadow");
INSERT INTO "Dogs" VALUES ("20", "GOLD", "Bailey");
INSERT INTO "Dogs" VALUES ("21", "LAB", "Milo");
INSERT INTO "Dogs" VALUES ("22", "LAB", "Sophie");
INSERT INTO "Dogs" VALUES ("23", "LAB", "Leo");
INSERT INTO "Dogs" VALUES ("24", "GER", "Zeus");
INSERT INTO "Dogs" VALUES ("25", "GOLD", "Ruby");
INSERT INTO "Dogs" VALUES ("26", "LAB", "Coco");
INSERT INTO "Dogs" VALUES ("27", "LAB", "Bentley");
INSERT INTO "Dogs" VALUES ("28", "LAB", "Penny");
INSERT INTO "Dogs" VALUES ("29", "GER", "Diesel");
INSERT INTO "Dogs" VALUES ("30", "GOLD", "Ginger");
INSERT INTO "Owners" VALUES ("1", "Alice");
INSERT INTO "Owners" VALUES ("2", "Bob");
INSERT INTO "Owners" VALUES ("3", "Charlie");
INSERT INTO "Owners" VALUES ("4", "Diana");
INSERT INTO "Owners" VALUES ("5", "Eve");
INSERT INTO "Owners" VALUES ("6", "Frank");
INSERT INTO "Owners" VALUES ("7", "Grace");
INSERT INTO "Owners" VALUES ("8", "Henry");
INSERT INTO "Owners" VALUES ("9", "Ivy");
INSERT INTO "Owners" VALUES ("10", "Jack");
INSERT INTO "Sizes" VALUES ("S", "Small");
INSERT INTO "Sizes" VALUES ("M", "Medium");