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 "Breeds" (
"breed_code" VARCHAR(10),
"breed_name" VARCHAR(80),
PRIMARY KEY ("breed_code")
);

CREATE TABLE "Dogs" (
"dog_id" INT,
"age" VARCHAR(20),
"date_of_birth" DATETIME,
"date_arrived" DATETIME,
PRIMARY KEY ("dog_id")
);

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





INSERT INTO "Breeds" VALUES ("BD001", "Labrador Retriever");
INSERT INTO "Breeds" VALUES ("BD002", "German Shepherd");
INSERT INTO "Breeds" VALUES ("BD003", "Beagle");
INSERT INTO "Breeds" VALUES ("BD004", "Bulldog");
INSERT INTO "Breeds" VALUES ("BD005", "Poodle");
INSERT INTO "Dogs" VALUES ("1", "5 years", "2018-04-12", "2023-01-10");
INSERT INTO "Dogs" VALUES ("2", "12 years", "2011-06-23", "2023-02-15");
INSERT INTO "Dogs" VALUES ("3", "3 years", "2020-11-05", "2023-03-20");
INSERT INTO "Dogs" VALUES ("4", "12 years", "2011-06-23", "2023-04-01");
INSERT INTO "Dogs" VALUES ("5", "1 year", "2022-08-30", "2023-05-05");
INSERT INTO "Dogs" VALUES ("6", "10 years", "2013-09-14", "2023-06-10");
INSERT INTO "Dogs" VALUES ("7", "12 years", "2011-06-23", "2023-07-15");
INSERT INTO "Owners" VALUES ("1", "Alice");
INSERT INTO "Owners" VALUES ("2", "Bob");
INSERT INTO "Owners" VALUES ("3", "Charlie");
INSERT INTO "Owners" VALUES ("4", "Diana");
INSERT INTO "Owners" VALUES ("5", "Ethan");