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

CREATE TABLE "Professionals" (
"professional_id" INT UNIQUE,
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,
"treatment_type_code" VARCHAR(10),
"date_of_treatment" DATETIME,
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("treatment_type_code") REFERENCES "Treatment_Types"("treatment_type_code")
);





INSERT INTO "Dogs" VALUES ("1");
INSERT INTO "Dogs" VALUES ("2");
INSERT INTO "Dogs" VALUES ("3");
INSERT INTO "Dogs" VALUES ("4");
INSERT INTO "Dogs" VALUES ("5");
INSERT INTO "Dogs" VALUES ("6");
INSERT INTO "Dogs" VALUES ("7");
INSERT INTO "Dogs" VALUES ("8");
INSERT INTO "Dogs" VALUES ("9");
INSERT INTO "Dogs" VALUES ("10");
INSERT INTO "Professionals" VALUES ("101");
INSERT INTO "Professionals" VALUES ("102");
INSERT INTO "Professionals" VALUES ("103");
INSERT INTO "Professionals" VALUES ("104");
INSERT INTO "Professionals" VALUES ("105");
INSERT INTO "Treatment_Types" VALUES ("VACC", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("GROOM", "Grooming");
INSERT INTO "Treatment_Types" VALUES ("CHECKUP", "Annual Check-up");
INSERT INTO "Treatment_Types" VALUES ("SURG", "Surgery");
INSERT INTO "Treatment_Types" VALUES ("DENTAL", "Dental Cleaning");
INSERT INTO "Treatment_Types" VALUES ("PHYSIO", "Physiotherapy");
INSERT INTO "Treatment_Types" VALUES ("TRAIN", "Behavioral Training");
INSERT INTO "Treatments" VALUES ("1", "VACC", "2023-01-15", "50.00");
INSERT INTO "Treatments" VALUES ("2", "GROOM", "2023-01-20", "45.00");
INSERT INTO "Treatments" VALUES ("3", "CHECKUP", "2023-02-01", "75.00");
INSERT INTO "Treatments" VALUES ("4", "VACC", "2023-02-10", "50.00");
INSERT INTO "Treatments" VALUES ("5", "GROOM", "2023-02-15", "45.00");
INSERT INTO "Treatments" VALUES ("6", "SURG", "2023-03-01", "500.00");
INSERT INTO "Treatments" VALUES ("7", "DENTAL", "2023-03-05", "150.00");
INSERT INTO "Treatments" VALUES ("8", "VACC", "2023-03-10", "50.00");
INSERT INTO "Treatments" VALUES ("9", "GROOM", "2023-03-12", "45.00");
INSERT INTO "Treatments" VALUES ("10", "CHECKUP", "2023-03-15", "75.00");
INSERT INTO "Treatments" VALUES ("11", "PHYSIO", "2023-04-01", "80.00");
INSERT INTO "Treatments" VALUES ("12", "PHYSIO", "2023-04-08", "80.00");
INSERT INTO "Treatments" VALUES ("13", "TRAIN", "2023-04-10", "120.00");
INSERT INTO "Treatments" VALUES ("14", "TRAIN", "2023-04-17", "120.00");
INSERT INTO "Treatments" VALUES ("15", "TRAIN", "2023-04-24", "120.00");
INSERT INTO "Treatments" VALUES ("16", "GROOM", "2023-05-01", "45.00");
INSERT INTO "Treatments" VALUES ("17", "VACC", "2023-05-05", "50.00");
INSERT INTO "Treatments" VALUES ("18", "DENTAL", "2023-05-10", "150.00");
INSERT INTO "Treatments" VALUES ("19", "CHECKUP", "2023-05-15", "75.00");
INSERT INTO "Treatments" VALUES ("20", "SURG", "2023-05-20", "600.00");
INSERT INTO "Treatments" VALUES ("21", "GROOM", "2023-06-01", "45.00");
INSERT INTO "Treatments" VALUES ("22", "GROOM", "2023-06-05", "45.00");
INSERT INTO "Treatments" VALUES ("23", "GROOM", "2023-06-10", "45.00");