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),
"age" VARCHAR(20),
"date_of_birth" DATETIME,
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),
PRIMARY KEY ("owner_id")
);





INSERT INTO "Owners" VALUES ("1", "Alice", "Smith");
INSERT INTO "Owners" VALUES ("2", "Bob", "Johnson");
INSERT INTO "Owners" VALUES ("3", "Charlie", "Brown");
INSERT INTO "Owners" VALUES ("4", "Diana", "Miller");
INSERT INTO "Owners" VALUES ("5", "Eve", "Davis");
INSERT INTO "Owners" VALUES ("6", "Frank", "Garcia");
INSERT INTO "Owners" VALUES ("7", "Grace", "Rodriguez");
INSERT INTO "Dogs" VALUES ("101", "1", "Buddy", "5 years", "2018-03-15");
INSERT INTO "Dogs" VALUES ("102", "2", "Max", "3 years", "2020-01-20");
INSERT INTO "Dogs" VALUES ("103", "3", "Bella", "7 years", "2016-07-01");
INSERT INTO "Dogs" VALUES ("104", "4", "Lucy", "1 year", "2022-11-10");
INSERT INTO "Dogs" VALUES ("105", "5", "Daisy", "2 years", "2021-05-25");
INSERT INTO "Dogs" VALUES ("106", "1", "Rocky", "4 years", "2019-09-01");
INSERT INTO "Dogs" VALUES ("107", "6", "Milo", "6 months", "2023-06-01");
INSERT INTO "Dogs" VALUES ("108", "7", "Zoe", "6 months", "2023-06-01");
INSERT INTO "Dogs" VALUES ("109", "2", "Charlie", "1 year", "2022-10-05");
INSERT INTO "Dogs" VALUES ("110", "3", "Cooper", "8 years", "2015-02-14");