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 UNIQUE,
"owner_id" INT,
"breed_code" VARCHAR(10),
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"dog_id" INT,
"professional_id" INT,
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("dog_id") REFERENCES "Dogs"("dog_id")
);





INSERT INTO "Dogs" VALUES ("1", "101", "BC001");
INSERT INTO "Dogs" VALUES ("2", "102", "BC002");
INSERT INTO "Dogs" VALUES ("3", "103", "BC003");
INSERT INTO "Dogs" VALUES ("4", "104", "BC001");
INSERT INTO "Dogs" VALUES ("5", "105", "BC004");
INSERT INTO "Dogs" VALUES ("6", "106", "BC002");
INSERT INTO "Dogs" VALUES ("7", "107", "BC005");
INSERT INTO "Dogs" VALUES ("8", "108", "BC003");
INSERT INTO "Dogs" VALUES ("9", "109", "BC006");
INSERT INTO "Dogs" VALUES ("10", "110", "BC007");
INSERT INTO "Treatments" VALUES ("1", "1", "201");
INSERT INTO "Treatments" VALUES ("2", "2", "202");
INSERT INTO "Treatments" VALUES ("3", "4", "203");
INSERT INTO "Treatments" VALUES ("4", "6", "204");
INSERT INTO "Treatments" VALUES ("5", "6", "205");
INSERT INTO "Treatments" VALUES ("6", "9", "206");