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),
"city" VARCHAR(50),
"state" VARCHAR(20),
PRIMARY KEY ("owner_id")
);





INSERT INTO "Owners" VALUES ("1", "Alice", "Richmond", "Virginia");
INSERT INTO "Owners" VALUES ("2", "Bob", "Norfolk", "Virginia");
INSERT INTO "Owners" VALUES ("3", "Charlie", "Alexandria", "Virginia");
INSERT INTO "Owners" VALUES ("4", "Diana", "Charlottesville", "Virginia");
INSERT INTO "Owners" VALUES ("5", "Evan", "Roanoke", "Virginia");
INSERT INTO "Owners" VALUES ("6", "Fiona", "Portland", "Oregon");
INSERT INTO "Owners" VALUES ("7", "George", "Seattle", "Washington");
INSERT INTO "Owners" VALUES ("8", "Hannah", "Richmond", "Virginia");
INSERT INTO "Owners" VALUES ("9", "Ian", "Dallas", "Texas");
INSERT INTO "Owners" VALUES ("10", "Jane", "Richmond", "Virginia");
INSERT INTO "Dogs" VALUES ("101", "1", "LAB", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "1", "GSD", "Max");
INSERT INTO "Dogs" VALUES ("103", "2", "BEA", "Bella");
INSERT INTO "Dogs" VALUES ("104", "3", "PUG", "Rocky");
INSERT INTO "Dogs" VALUES ("105", "4", "BUL", "Daisy");
INSERT INTO "Dogs" VALUES ("106", "5", "BOX", "Milo");
INSERT INTO "Dogs" VALUES ("107", "6", "LAB", "Luna");
INSERT INTO "Dogs" VALUES ("108", "7", "GSD", "Charlie");
INSERT INTO "Dogs" VALUES ("109", "8", "POM", "Coco");
INSERT INTO "Dogs" VALUES ("110", "8", "BUL", "Rex");
INSERT INTO "Dogs" VALUES ("111", "10", "BEA", "Zoe");
INSERT INTO "Dogs" VALUES ("112", "10", "PUG", "Toby");
INSERT INTO "Dogs" VALUES ("113", "10", "LAB", "Bailey");