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 ("GSD", "German Shepherd");
INSERT INTO "Breeds" VALUES ("PUD", "Poodle");
INSERT INTO "Breeds" VALUES ("BEA", "Beagle");
INSERT INTO "Breeds" VALUES ("BUL", "Bulldog");
INSERT INTO "Breeds" VALUES ("DACH", "Dachshund");
INSERT INTO "Breeds" VALUES ("GOLD", "Golden Retriever");
INSERT INTO "Breeds" VALUES ("CHI", "Chihuahua");
INSERT INTO "Breeds" VALUES ("BOX", "Boxer");
INSERT INTO "Breeds" VALUES ("ROT", "Rottweiler");
INSERT INTO "Dogs" VALUES ("1", "LAB", "Buddy");
INSERT INTO "Dogs" VALUES ("2", "GSD", "Max");
INSERT INTO "Dogs" VALUES ("3", "LAB", "Bella");
INSERT INTO "Dogs" VALUES ("4", "PUD", "Lucy");
INSERT INTO "Dogs" VALUES ("5", "LAB", "Charlie");
INSERT INTO "Dogs" VALUES ("6", "BEA", "Daisy");
INSERT INTO "Dogs" VALUES ("7", "GSD", "Rocky");
INSERT INTO "Dogs" VALUES ("8", "LAB", "Molly");
INSERT INTO "Dogs" VALUES ("9", "BUL", "Duke");
INSERT INTO "Dogs" VALUES ("10", "PUD", "Sophie");
INSERT INTO "Dogs" VALUES ("11", "LAB", "Cooper");
INSERT INTO "Dogs" VALUES ("12", "DACH", "Penny");
INSERT INTO "Dogs" VALUES ("13", "GOLD", "Bailey");
INSERT INTO "Dogs" VALUES ("14", "LAB", "Sadie");
INSERT INTO "Dogs" VALUES ("15", "CHI", "Zoe");
INSERT INTO "Dogs" VALUES ("16", "GSD", "Bear");
INSERT INTO "Dogs" VALUES ("17", "LAB", "Luna");
INSERT INTO "Dogs" VALUES ("18", "BOX", "Apollo");
INSERT INTO "Dogs" VALUES ("19", "LAB", "Chloe");
INSERT INTO "Dogs" VALUES ("20", "ROT", "Shadow");
INSERT INTO "Dogs" VALUES ("21", "LAB", "Milo");
INSERT INTO "Dogs" VALUES ("22", "GSD", "Coco");
INSERT INTO "Dogs" VALUES ("23", "LAB", "Ruby");
INSERT INTO "Dogs" VALUES ("24", "PUD", "Oscar");
INSERT INTO "Dogs" VALUES ("25", "LAB", "Rosie");
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");
INSERT INTO "Sizes" VALUES ("L", "Large");
INSERT INTO "Sizes" VALUES ("XL", "Extra Large");