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 "Professionals" (
"professional_id" INT UNIQUE,
"role_code" VARCHAR(10),
"first_name" VARCHAR(50),
"last_name" VARCHAR(50),
"email_address" 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,
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id")
);





INSERT INTO "Professionals" VALUES ("1", "VET", "Alice", "Smith", "alice.smith@example.com");
INSERT INTO "Professionals" VALUES ("2", "TRAINER", "Bob", "Johnson", "bob.johnson@example.com");
INSERT INTO "Professionals" VALUES ("3", "GROOMER", "Charlie", "Brown", "charlie.brown@example.com");
INSERT INTO "Professionals" VALUES ("4", "VET", "Diana", "Prince", "diana.prince@example.com");
INSERT INTO "Professionals" VALUES ("5", "TRAINER", "Eve", "Davis", "eve.davis@example.com");
INSERT INTO "Professionals" VALUES ("6", "VET", "Frank", "White", "frank.white@example.com");
INSERT INTO "Treatment_Types" VALUES ("VACC", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("CHECKUP", "Annual Checkup");
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 "Treatments" VALUES ("101", "1");
INSERT INTO "Treatments" VALUES ("102", "1");
INSERT INTO "Treatments" VALUES ("103", "2");
INSERT INTO "Treatments" VALUES ("104", "3");
INSERT INTO "Treatments" VALUES ("105", "1");
INSERT INTO "Treatments" VALUES ("106", "4");
INSERT INTO "Treatments" VALUES ("107", "2");
INSERT INTO "Treatments" VALUES ("108", "5");
INSERT INTO "Treatments" VALUES ("109", "4");
INSERT INTO "Treatments" VALUES ("110", "4");
INSERT INTO "Treatments" VALUES ("111", "6");