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 Checkup");
INSERT INTO "Treatment_Types" VALUES ("DENTAL", "Dental Cleaning");
INSERT INTO "Treatment_Types" VALUES ("SURG", "Surgery");
INSERT INTO "Treatment_Types" VALUES ("MEDS", "Medication Dispensing");
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", "40.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", "DENTAL", "2023-02-15", "200.00");
INSERT INTO "Treatments" VALUES ("6", "GROOM", "2023-03-01", "45.00");
INSERT INTO "Treatments" VALUES ("7", "CHECKUP", "2023-03-05", "75.00");
INSERT INTO "Treatments" VALUES ("8", "SURG", "2023-03-10", "500.00");
INSERT INTO "Treatments" VALUES ("9", "VACC", "2023-03-12", "50.00");
INSERT INTO "Treatments" VALUES ("10", "MEDS", "2023-03-15", "25.00");
INSERT INTO "Treatments" VALUES ("11", "MEDS", "2023-03-20", "30.00");
INSERT INTO "Treatments" VALUES ("12", "TRAIN", "2023-04-01", "150.00");
INSERT INTO "Treatments" VALUES ("13", "GROOM", "2023-04-05", "40.00");
INSERT INTO "Treatments" VALUES ("14", "DENTAL", "2023-04-10", "220.00");
INSERT INTO "Treatments" VALUES ("15", "TRAIN", "2023-04-15", "150.00");
INSERT INTO "Treatments" VALUES ("16", "MEDS", "2023-04-20", "20.00");
INSERT INTO "Treatments" VALUES ("17", "VACC", "2023-04-25", "50.00");
INSERT INTO "Treatments" VALUES ("18", "CHECKUP", "2023-05-01", "75.00");
INSERT INTO "Treatments" VALUES ("19", "GROOM", "2023-05-05", "35.00");
INSERT INTO "Treatments" VALUES ("20", "MEDS", "2023-05-10", "15.00");
INSERT INTO "Treatments" VALUES ("21", "MEDS", "2023-05-12", "10.00");