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

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

CREATE TABLE "Treatments" (
"treatment_id" INT,
"date_of_treatment" DATETIME,
PRIMARY KEY ("treatment_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", "2", "2022-01-15");
INSERT INTO "Dogs" VALUES ("2", "5", "2019-06-20");
INSERT INTO "Dogs" VALUES ("3", "1", "2023-03-10");
INSERT INTO "Dogs" VALUES ("4", "3", "2021-11-05");
INSERT INTO "Dogs" VALUES ("5", "7", "2017-08-30");
INSERT INTO "Dogs" VALUES ("6", "4", "2020-05-22");
INSERT INTO "Dogs" VALUES ("7", "3", "2021-12-01");
INSERT INTO "Dogs" VALUES ("8", "5", "2019-04-15");
INSERT INTO "Dogs" VALUES ("9", "1", "2023-02-28");
INSERT INTO "Dogs" VALUES ("10", "6", "2018-09-10");
INSERT INTO "Dogs" VALUES ("11", "4", "2020-07-19");
INSERT INTO "Dogs" VALUES ("12", "2", "2022-03-25");
INSERT INTO "Dogs" VALUES ("13", "3", "2021-10-10");
INSERT INTO "Dogs" VALUES ("14", "0", "2024-04-01");
INSERT INTO "Dogs" VALUES ("15", "8", "2016-01-01");
INSERT INTO "Dogs" VALUES ("16", "4", "2020-06-15");
INSERT INTO "Dogs" VALUES ("17", "3", "2021-09-30");
INSERT INTO "Dogs" VALUES ("18", "5", "2019-07-07");
INSERT INTO "Dogs" VALUES ("19", "2", "2022-02-14");
INSERT INTO "Dogs" VALUES ("20", "1", "2023-05-05");
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");
INSERT INTO "Treatments" VALUES ("1", "2023-01-10");
INSERT INTO "Treatments" VALUES ("2", "2023-02-15");
INSERT INTO "Treatments" VALUES ("3", "2023-03-20");
INSERT INTO "Treatments" VALUES ("4", "2023-04-25");
INSERT INTO "Treatments" VALUES ("5", "2023-05-30");