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 "Dogs" (
"dog_id" INT,
"owner_id" INT,
"breed_code" VARCHAR(10),
"name" VARCHAR(50),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("owner_id") REFERENCES "Owners"("owner_id")
);

CREATE TABLE "Owners" (
"owner_id" INT UNIQUE,
"first_name" VARCHAR(50),
"last_name" VARCHAR(50),
"city" VARCHAR(50),
PRIMARY KEY ("owner_id")
);





INSERT INTO "Owners" VALUES ("1", "Alice", "Smith", "New York");
INSERT INTO "Owners" VALUES ("2", "Bob", "Johnson", "Los Angeles");
INSERT INTO "Owners" VALUES ("3", "Charlie", "Williams", "Chicago");
INSERT INTO "Owners" VALUES ("4", "Diana", "Brown", "Houston");
INSERT INTO "Owners" VALUES ("5", "Ethan", "Jones", "Phoenix");
INSERT INTO "Owners" VALUES ("6", "Fiona", "Garcia", "Philadelphia");
INSERT INTO "Owners" VALUES ("7", "George", "Martinez", "San Antonio");
INSERT INTO "Owners" VALUES ("8", "Hannah", "Davis", "San Diego");
INSERT INTO "Owners" VALUES ("9", "Ian", "Rodriguez", "Dallas");
INSERT INTO "Owners" VALUES ("10", "Julia", "Miller", "San Jose");
INSERT INTO "Dogs" VALUES ("101", "1", "BC01", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "1", "BC02", "Max");
INSERT INTO "Dogs" VALUES ("103", "2", "BC01", "Bella");
INSERT INTO "Dogs" VALUES ("104", "3", "BC03", "Charlie");
INSERT INTO "Dogs" VALUES ("105", "4", "BC02", "Lucy");
INSERT INTO "Dogs" VALUES ("106", "5", "BC04", "Daisy");
INSERT INTO "Dogs" VALUES ("107", "6", "BC01", "Molly");
INSERT INTO "Dogs" VALUES ("108", "7", "BC05", "Bailey");
INSERT INTO "Dogs" VALUES ("109", "8", "BC03", "Lola");
INSERT INTO "Dogs" VALUES ("110", "9", "BC02", "Sophie");
INSERT INTO "Dogs" VALUES ("111", "10", "BC04", "Chloe");
INSERT INTO "Dogs" VALUES ("112", "10", "BC01", "Rocky");
INSERT INTO "Dogs" VALUES ("113", "3", "BC05", "Jack");
INSERT INTO "Dogs" VALUES ("114", "5", "BC02", "Sadie");
INSERT INTO "Dogs" VALUES ("115", "7", "BC03", "Toby");