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,
"name" VARCHAR(50),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("owner_id") REFERENCES "Owners"("owner_id")
);

CREATE TABLE "Owners" (
"owner_id" INT UNIQUE,
PRIMARY KEY ("owner_id")
);

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





INSERT INTO "Owners" VALUES ("1");
INSERT INTO "Owners" VALUES ("2");
INSERT INTO "Owners" VALUES ("3");
INSERT INTO "Owners" VALUES ("4");
INSERT INTO "Owners" VALUES ("5");
INSERT INTO "Owners" VALUES ("6");
INSERT INTO "Dogs" VALUES ("1", "1", "Buddy");
INSERT INTO "Dogs" VALUES ("2", "1", "Max");
INSERT INTO "Dogs" VALUES ("3", "2", "Bella");
INSERT INTO "Dogs" VALUES ("4", "3", "Lucy");
INSERT INTO "Dogs" VALUES ("5", "4", "Charlie");
INSERT INTO "Dogs" VALUES ("6", "5", "Daisy");
INSERT INTO "Dogs" VALUES ("7", "6", "Rocky");
INSERT INTO "Dogs" VALUES ("8", "1", "Milo");
INSERT INTO "Dogs" VALUES ("9", "2", "Luna");
INSERT INTO "Dogs" VALUES ("10", "3", "Cooper");
INSERT INTO "Treatments" VALUES ("101", "1");
INSERT INTO "Treatments" VALUES ("102", "2");
INSERT INTO "Treatments" VALUES ("103", "3");
INSERT INTO "Treatments" VALUES ("104", "5");
INSERT INTO "Treatments" VALUES ("105", "6");
INSERT INTO "Treatments" VALUES ("106", "8");
INSERT INTO "Treatments" VALUES ("107", "9");