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),
"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,
"professional_id" INT,
"treatment_type_code" VARCHAR(10),
"cost_of_treatment" DECIMAL(19, 4),
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 ("101", "1", "LAB", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "1", "GSD", "Max");
INSERT INTO "Dogs" VALUES ("103", "2", "POO", "Bella");
INSERT INTO "Dogs" VALUES ("104", "3", "BEA", "Lucy");
INSERT INTO "Dogs" VALUES ("105", "4", "DACH", "Charlie");
INSERT INTO "Dogs" VALUES ("106", "5", "GOLD", "Daisy");
INSERT INTO "Dogs" VALUES ("107", "6", "BOX", "Rocky");
INSERT INTO "Dogs" VALUES ("108", "1", "CHI", "Milo");
INSERT INTO "Dogs" VALUES ("109", "2", "SIBE", "Luna");
INSERT INTO "Dogs" VALUES ("110", "3", "BULL", "Cooper");
INSERT INTO "Treatments" VALUES ("1", "101", "1001", "VET", "150.00");
INSERT INTO "Treatments" VALUES ("2", "101", "1002", "GROOM", "50.00");
INSERT INTO "Treatments" VALUES ("3", "102", "1001", "VET", "800.00");
INSERT INTO "Treatments" VALUES ("4", "103", "1003", "VET", "1200.00");
INSERT INTO "Treatments" VALUES ("5", "104", "1004", "GROOM", "75.00");
INSERT INTO "Treatments" VALUES ("6", "105", "1005", "VET", "300.00");
INSERT INTO "Treatments" VALUES ("7", "105", "1006", "TRAIN", "200.00");
INSERT INTO "Treatments" VALUES ("8", "106", "1007", "VET", "950.00");
INSERT INTO "Treatments" VALUES ("9", "107", "1008", "VET", "1100.00");
INSERT INTO "Treatments" VALUES ("10", "108", "1009", "GROOM", "40.00");
INSERT INTO "Treatments" VALUES ("11", "109", "1010", "VET", "600.00");
INSERT INTO "Treatments" VALUES ("12", "110", "1011", "VET", "100.00");
INSERT INTO "Treatments" VALUES ("13", "101", "1001", "VET", "200.00");
INSERT INTO "Treatments" VALUES ("14", "102", "1001", "VET", "300.00");
INSERT INTO "Treatments" VALUES ("15", "103", "1003", "VET", "500.00");
INSERT INTO "Treatments" VALUES ("16", "104", "1004", "GROOM", "25.00");
INSERT INTO "Treatments" VALUES ("17", "105", "1005", "VET", "150.00");
INSERT INTO "Treatments" VALUES ("18", "106", "1007", "VET", "50.00");
INSERT INTO "Treatments" VALUES ("19", "107", "1008", "VET", "200.00");
INSERT INTO "Treatments" VALUES ("20", "108", "1009", "GROOM", "10.00");
INSERT INTO "Treatments" VALUES ("21", "109", "1010", "VET", "100.00");
INSERT INTO "Treatments" VALUES ("22", "110", "1011", "VET", "50.00");