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,
"breed_code" VARCHAR(10),
"name" VARCHAR(50),
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Professionals" (
"professional_id" INT,
"first_name" VARCHAR(50),
PRIMARY KEY ("professional_id")
);

CREATE TABLE "Treatment_Types" (
"treatment_type_code" VARCHAR(10),
"treatment_type_description" VARCHAR(80),
PRIMARY KEY ("treatment_type_code")
);

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





INSERT INTO "Dogs" VALUES ("101", "LAB", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "GSD", "Max");
INSERT INTO "Dogs" VALUES ("103", "POO", "Daisy");
INSERT INTO "Dogs" VALUES ("104", "BEA", "Rocky");
INSERT INTO "Dogs" VALUES ("105", "DACH", "Lucy");
INSERT INTO "Dogs" VALUES ("106", "GOLD", "Charlie");
INSERT INTO "Dogs" VALUES ("107", "BULL", "Bella");
INSERT INTO "Dogs" VALUES ("108", "SIBE", "Luna");
INSERT INTO "Dogs" VALUES ("109", "BOX", "Cooper");
INSERT INTO "Dogs" VALUES ("110", "ROTT", "Molly");
INSERT INTO "Professionals" VALUES ("1", "Alice");
INSERT INTO "Professionals" VALUES ("2", "Bob");
INSERT INTO "Professionals" VALUES ("3", "Carol");
INSERT INTO "Professionals" VALUES ("4", "David");
INSERT INTO "Professionals" VALUES ("5", "Eve");
INSERT INTO "Treatment_Types" VALUES ("VACC", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("GROOM", "Grooming");
INSERT INTO "Treatment_Types" VALUES ("SURG", "Surgery");
INSERT INTO "Treatment_Types" VALUES ("DENT", "Dental Cleaning");
INSERT INTO "Treatment_Types" VALUES ("CHECK", "Annual Check-up");
INSERT INTO "Treatment_Types" VALUES ("PHYS", "Physical Therapy");
INSERT INTO "Treatments" VALUES ("1", "101", "150.00");
INSERT INTO "Treatments" VALUES ("2", "101", "200.00");
INSERT INTO "Treatments" VALUES ("3", "102", "500.00");
INSERT INTO "Treatments" VALUES ("4", "102", "600.00");
INSERT INTO "Treatments" VALUES ("5", "103", "900.00");
INSERT INTO "Treatments" VALUES ("6", "104", "100.00");
INSERT INTO "Treatments" VALUES ("7", "104", "50.00");
INSERT INTO "Treatments" VALUES ("8", "105", "1200.00");
INSERT INTO "Treatments" VALUES ("9", "106", "750.00");
INSERT INTO "Treatments" VALUES ("10", "107", "1000.00");
INSERT INTO "Treatments" VALUES ("11", "108", "1001.00");
INSERT INTO "Treatments" VALUES ("12", "109", "999.99");
INSERT INTO "Treatments" VALUES ("13", "110", "1000.01");
INSERT INTO "Treatments" VALUES ("14", "101", "50.00");
INSERT INTO "Treatments" VALUES ("15", "103", "50.00");
INSERT INTO "Treatments" VALUES ("16", "104", "800.00");
INSERT INTO "Treatments" VALUES ("17", "106", "200.00");
INSERT INTO "Treatments" VALUES ("18", "107", "1.00");