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

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

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

CREATE TABLE "Treatments" (
"treatment_id" INT,
"professional_id" INT,
"treatment_type_code" VARCHAR(10),
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id"),
FOREIGN KEY ("treatment_type_code") REFERENCES "Treatment_Types"("treatment_type_code")
);





INSERT INTO "Dogs" VALUES ("1", "Buddy");
INSERT INTO "Dogs" VALUES ("2", "Lucy");
INSERT INTO "Dogs" VALUES ("3", "Max");
INSERT INTO "Dogs" VALUES ("4", "Daisy");
INSERT INTO "Dogs" VALUES ("5", "Charlie");
INSERT INTO "Dogs" VALUES ("6", "Bella");
INSERT INTO "Dogs" VALUES ("7", "Rocky");
INSERT INTO "Dogs" VALUES ("8", "Luna");
INSERT INTO "Dogs" VALUES ("9", "Cooper");
INSERT INTO "Dogs" VALUES ("10", "Zoe");
INSERT INTO "Professionals" VALUES ("101", "Alice");
INSERT INTO "Professionals" VALUES ("102", "Bob");
INSERT INTO "Professionals" VALUES ("103", "Carol");
INSERT INTO "Professionals" VALUES ("104", "David");
INSERT INTO "Professionals" VALUES ("105", "Eve");
INSERT INTO "Treatment_Types" VALUES ("GROOM", "Grooming Session");
INSERT INTO "Treatment_Types" VALUES ("VETCHK", "Veterinary Check-up");
INSERT INTO "Treatment_Types" VALUES ("TRAIN", "Obedience Training");
INSERT INTO "Treatment_Types" VALUES ("DENTAL", "Dental Cleaning");
INSERT INTO "Treatment_Types" VALUES ("VACC", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("BOARD", "Overnight Boarding");
INSERT INTO "Treatment_Types" VALUES ("HYDRO", "Hydrotherapy Session");
INSERT INTO "Treatments" VALUES ("1", "101", "GROOM", "50.00");
INSERT INTO "Treatments" VALUES ("2", "102", "VETCHK", "75.00");
INSERT INTO "Treatments" VALUES ("3", "101", "TRAIN", "120.00");
INSERT INTO "Treatments" VALUES ("4", "103", "DENTAL", "200.00");
INSERT INTO "Treatments" VALUES ("5", "102", "VACC", "60.00");
INSERT INTO "Treatments" VALUES ("6", "104", "BOARD", "30.00");
INSERT INTO "Treatments" VALUES ("7", "101", "GROOM", "55.00");
INSERT INTO "Treatments" VALUES ("8", "105", "HYDRO", "80.00");
INSERT INTO "Treatments" VALUES ("9", "102", "VETCHK", "85.00");
INSERT INTO "Treatments" VALUES ("10", "103", "DENTAL", "210.00");
INSERT INTO "Treatments" VALUES ("11", "101", "TRAIN", "130.00");
INSERT INTO "Treatments" VALUES ("12", "104", "BOARD", "35.00");
INSERT INTO "Treatments" VALUES ("13", "105", "HYDRO", "90.00");
INSERT INTO "Treatments" VALUES ("14", "101", "GROOM", "50.00");
INSERT INTO "Treatments" VALUES ("15", "102", "VACC", "65.00");
INSERT INTO "Treatments" VALUES ("16", "103", "VETCHK", "70.00");
INSERT INTO "Treatments" VALUES ("17", "104", "TRAIN", "110.00");
INSERT INTO "Treatments" VALUES ("18", "105", "GROOM", "45.00");
INSERT INTO "Treatments" VALUES ("19", "101", "VETCHK", "78.00");
INSERT INTO "Treatments" VALUES ("20", "102", "TRAIN", "125.00");