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 "Sizes" (
"size_code" VARCHAR(10),
"size_description" VARCHAR(80),
PRIMARY KEY ("size_code")
);

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", "5 years", "2018-04-15");
INSERT INTO "Dogs" VALUES ("2", "12 years", "2011-09-30");
INSERT INTO "Dogs" VALUES ("3", "3 years", "2020-01-10");
INSERT INTO "Dogs" VALUES ("4", "15 years", "2008-06-22");
INSERT INTO "Dogs" VALUES ("5", "10 years", "2013-11-05");
INSERT INTO "Dogs" VALUES ("6", "15 years", "2008-06-22");
INSERT INTO "Dogs" VALUES ("7", "1 year", "2022-07-01");
INSERT INTO "Dogs" VALUES ("8", "7 years", "2016-03-18");
INSERT INTO "Dogs" VALUES ("9", "15 years", "2008-06-22");
INSERT INTO "Dogs" VALUES ("10", "9 years", "2014-12-12");
INSERT INTO "Sizes" VALUES ("SZ001", "Small");
INSERT INTO "Sizes" VALUES ("SZ002", "Medium");
INSERT INTO "Sizes" VALUES ("SZ003", "Large");
INSERT INTO "Sizes" VALUES ("SZ004", "Extra Large");
INSERT INTO "Treatments" VALUES ("101", "2023-01-15");
INSERT INTO "Treatments" VALUES ("102", "2022-12-10");
INSERT INTO "Treatments" VALUES ("103", "2023-03-05");
INSERT INTO "Treatments" VALUES ("104", "2021-11-20");
INSERT INTO "Treatments" VALUES ("105", "2023-06-01");