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),
"date_of_birth" DATETIME,
"date_arrived" 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", "Johnson");
INSERT INTO "Owners" VALUES ("2", "Bob", "Smith");
INSERT INTO "Owners" VALUES ("3", "Carol", "Williams");
INSERT INTO "Owners" VALUES ("4", "David", "Brown");
INSERT INTO "Owners" VALUES ("5", "Eva", "Davis");
INSERT INTO "Dogs" VALUES ("101", "1", "Labrador", "2023-05-10", "2023-06-01");
INSERT INTO "Dogs" VALUES ("102", "2", "Beagle", "2022-12-15", "2023-01-10");
INSERT INTO "Dogs" VALUES ("103", "3", "Poodle", "2023-07-01", "2023-07-15");
INSERT INTO "Dogs" VALUES ("104", "4", "Bulldog", "2021-11-20", "2022-01-05");
INSERT INTO "Dogs" VALUES ("105", "5", "Boxer", "2023-07-01", "2023-07-10");
INSERT INTO "Dogs" VALUES ("106", "1", "Chihuahua", "2023-06-30", "2023-07-01");
INSERT INTO "Dogs" VALUES ("107", "2", "Dachshund", "2023-07-01", "2023-07-20");