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),
"breed_code" VARCHAR(10),
"name" VARCHAR(50),
"age" VARCHAR(20),
"gender" VARCHAR(1),
"weight" VARCHAR(20),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("breed_code") REFERENCES "Breeds"("breed_code")
);





INSERT INTO "Breeds" VALUES ("LAB", "Labrador Retriever");
INSERT INTO "Breeds" VALUES ("GSD", "German Shepherd");
INSERT INTO "Breeds" VALUES ("POO", "Poodle");
INSERT INTO "Breeds" VALUES ("BEA", "Beagle");
INSERT INTO "Breeds" VALUES ("BUL", "Bulldog");
INSERT INTO "Breeds" VALUES ("CHI", "Chihuahua");
INSERT INTO "Breeds" VALUES ("DACH", "Dachshund");
INSERT INTO "Breeds" VALUES ("GOLD", "Golden Retriever");
INSERT INTO "Breeds" VALUES ("BOX", "Boxer");
INSERT INTO "Breeds" VALUES ("HUSK", "Siberian Husky");
INSERT INTO "Dogs" VALUES ("1", "1", "LAB", "Buddy", "3 years", "M", "65 lbs");
INSERT INTO "Dogs" VALUES ("2", "0", "GSD", "Max", "5 years", "M", "80 lbs");
INSERT INTO "Dogs" VALUES ("3", "1", "POO", "Daisy", "2 years", "F", "15 lbs");
INSERT INTO "Dogs" VALUES ("4", "0", "BEA", "Lucy", "4 years", "F", "25 lbs");
INSERT INTO "Dogs" VALUES ("5", "1", "BUL", "Rocky", "1 year", "M", "50 lbs");
INSERT INTO "Dogs" VALUES ("6", "0", "CHI", "Bella", "6 months", "F", "5 lbs");
INSERT INTO "Dogs" VALUES ("7", "1", "DACH", "Charlie", "7 years", "M", "20 lbs");
INSERT INTO "Dogs" VALUES ("8", "0", "GOLD", "Sadie", "3 years", "F", "70 lbs");
INSERT INTO "Dogs" VALUES ("9", "1", "BOX", "Duke", "4 years", "M", "60 lbs");
INSERT INTO "Dogs" VALUES ("10", "0", "HUSK", "Luna", "2 years", "F", "45 lbs");
INSERT INTO "Dogs" VALUES ("11", "1", "LAB", "Molly", "10 years", "F", "75 lbs");
INSERT INTO "Dogs" VALUES ("12", "1", "GSD", "Bear", "8 years", "M", "90 lbs");
INSERT INTO "Dogs" VALUES ("13", "0", "POO", "Coco", "1 year", "F", "10 lbs");
INSERT INTO "Dogs" VALUES ("14", "1", "BEA", "Cooper", "9 years", "M", "30 lbs");
INSERT INTO "Dogs" VALUES ("15", "1", "BUL", "Roxy", "6 months", "F", "40 lbs");