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,
"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),
PRIMARY KEY ("owner_id")
);





INSERT INTO "Owners" VALUES ("1", "Alice");
INSERT INTO "Owners" VALUES ("2", "Bob");
INSERT INTO "Owners" VALUES ("3", "Charlie");
INSERT INTO "Owners" VALUES ("4", "David");
INSERT INTO "Owners" VALUES ("5", "Eve");
INSERT INTO "Owners" VALUES ("6", "Frank");
INSERT INTO "Owners" VALUES ("7", "Grace");
INSERT INTO "Owners" VALUES ("8", "Heidi");
INSERT INTO "Dogs" VALUES ("101", "1", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "1", "Max");
INSERT INTO "Dogs" VALUES ("103", "2", "Bella");
INSERT INTO "Dogs" VALUES ("104", "3", "Lucy");
INSERT INTO "Dogs" VALUES ("105", "3", "Daisy");
INSERT INTO "Dogs" VALUES ("106", "3", "Rocky");
INSERT INTO "Dogs" VALUES ("107", "5", "Milo");