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

CREATE TABLE "Treatments" (
"treatment_id" INT,
"dog_id" INT,
"professional_id" INT,
"treatment_type_code" VARCHAR(10),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id")
);





INSERT INTO "Professionals" VALUES ("1", "VET", "Alice", "alice.vet@example.com");
INSERT INTO "Professionals" VALUES ("2", "GROOM", "Bob", "bob.groom@example.com");
INSERT INTO "Professionals" VALUES ("3", "TRAIN", "Charlie", "charlie.train@example.com");
INSERT INTO "Professionals" VALUES ("4", "VET", "Diana", "diana.vet@example.com");
INSERT INTO "Professionals" VALUES ("5", "GROOM", "Eve", "eve.groom@example.com");
INSERT INTO "Professionals" VALUES ("6", "TRAIN", "Frank", "frank.train@example.com");
INSERT INTO "Professionals" VALUES ("7", "VET", "Grace", "grace.vet@example.com");
INSERT INTO "Professionals" VALUES ("8", "GROOM", "Hank", "hank.groom@example.com");
INSERT INTO "Treatments" VALUES ("101", "201", "1", "VACC");
INSERT INTO "Treatments" VALUES ("102", "202", "1", "CHECK");
INSERT INTO "Treatments" VALUES ("103", "203", "2", "BATH");
INSERT INTO "Treatments" VALUES ("104", "204", "5", "TRIM");
INSERT INTO "Treatments" VALUES ("105", "205", "5", "BATH");
INSERT INTO "Treatments" VALUES ("106", "206", "3", "TRAIN");
INSERT INTO "Treatments" VALUES ("107", "207", "3", "TRAIN");
INSERT INTO "Treatments" VALUES ("108", "208", "6", "TRAIN");