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

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





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", "VET", "Dr. Emily");
INSERT INTO "Professionals" VALUES ("102", "GROOM", "Sarah");
INSERT INTO "Professionals" VALUES ("103", "TRAINER", "John");
INSERT INTO "Professionals" VALUES ("104", "VET", "Dr. Alex");
INSERT INTO "Professionals" VALUES ("105", "GROOM", "Maria");
INSERT INTO "Professionals" VALUES ("106", "TRAINER", "David");
INSERT INTO "Professionals" VALUES ("107", "VET", "Dr. Olivia");
INSERT INTO "Treatment_Types" VALUES ("VACC", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("CHECKUP", "General Check-up");
INSERT INTO "Treatment_Types" VALUES ("GROOM", "Grooming Session");
INSERT INTO "Treatment_Types" VALUES ("TRAIN", "Obedience Training");
INSERT INTO "Treatment_Types" VALUES ("SURG", "Surgery");
INSERT INTO "Treatment_Types" VALUES ("DENTAL", "Dental Cleaning");
INSERT INTO "Treatments" VALUES ("1", "101", "2023-01-15 10:00:00");
INSERT INTO "Treatments" VALUES ("2", "102", "2023-01-16 14:30:00");
INSERT INTO "Treatments" VALUES ("3", "103", "2023-01-17 09:00:00");
INSERT INTO "Treatments" VALUES ("4", "101", "2023-01-18 11:00:00");
INSERT INTO "Treatments" VALUES ("5", "104", "2023-01-19 13:00:00");
INSERT INTO "Treatments" VALUES ("6", "105", "2023-01-20 10:00:00");
INSERT INTO "Treatments" VALUES ("7", "106", "2023-01-21 15:00:00");
INSERT INTO "Treatments" VALUES ("8", "104", "2023-01-22 09:30:00");
INSERT INTO "Treatments" VALUES ("9", "101", "2023-01-23 16:00:00");
INSERT INTO "Treatments" VALUES ("10", "107", "2023-01-24 11:00:00");
INSERT INTO "Treatments" VALUES ("11", "102", "2023-01-25 14:00:00");
INSERT INTO "Treatments" VALUES ("12", "103", "2023-01-26 10:00:00");
INSERT INTO "Treatments" VALUES ("13", "107", "2023-01-27 12:00:00");
INSERT INTO "Treatments" VALUES ("14", "104", "2023-01-28 10:00:00");
INSERT INTO "Treatments" VALUES ("15", "105", "2023-01-29 13:00:00");