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 ("B001", "Labrador Retriever");
INSERT INTO "Breeds" VALUES ("B002", "German Shepherd");
INSERT INTO "Breeds" VALUES ("B003", "Beagle");
INSERT INTO "Breeds" VALUES ("B004", "Bulldog");
INSERT INTO "Breeds" VALUES ("B005", "Poodle");
INSERT INTO "Dogs" VALUES ("1", "2 years", "2022-05-10");
INSERT INTO "Dogs" VALUES ("2", "5 years", "2019-03-15");
INSERT INTO "Dogs" VALUES ("3", "1 year", "2023-01-20");
INSERT INTO "Dogs" VALUES ("4", "3 years", "2021-07-30");
INSERT INTO "Dogs" VALUES ("5", "4 years", "2020-11-05");
INSERT INTO "Dogs" VALUES ("6", "6 years", "2018-02-25");
INSERT INTO "Dogs" VALUES ("7", "2 years", "2022-06-01");
INSERT INTO "Dogs" VALUES ("8", "7 years", "2017-09-12");
INSERT INTO "Dogs" VALUES ("9", "1 year", "2023-04-10");
INSERT INTO "Dogs" VALUES ("10", "3 years", "2021-08-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");
INSERT INTO "Treatments" VALUES ("1", "2024-01-10");
INSERT INTO "Treatments" VALUES ("2", "2023-12-05");
INSERT INTO "Treatments" VALUES ("3", "2024-03-15");
INSERT INTO "Treatments" VALUES ("4", "2023-11-20");
INSERT INTO "Treatments" VALUES ("5", "2024-02-28");