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

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





INSERT INTO "Professionals" VALUES ("1", "VET", "Alice");
INSERT INTO "Professionals" VALUES ("2", "TRAINER", "Bob");
INSERT INTO "Professionals" VALUES ("3", "GROOMER", "Charlie");
INSERT INTO "Professionals" VALUES ("4", "VET", "David");
INSERT INTO "Professionals" VALUES ("5", "TRAINER", "Eve");
INSERT INTO "Professionals" VALUES ("6", "VET", "Frank");
INSERT INTO "Professionals" VALUES ("7", "GROOMER", "Grace");
INSERT INTO "Professionals" VALUES ("8", "TRAINER", "Heidi");
INSERT INTO "Treatments" VALUES ("101", "1", "1");
INSERT INTO "Treatments" VALUES ("102", "2", "1");
INSERT INTO "Treatments" VALUES ("103", "3", "2");
INSERT INTO "Treatments" VALUES ("104", "4", "4");
INSERT INTO "Treatments" VALUES ("105", "5", "4");
INSERT INTO "Treatments" VALUES ("106", "6", "7");
INSERT INTO "Treatments" VALUES ("107", "7", "1");
INSERT INTO "Treatments" VALUES ("108", "8", "2");
INSERT INTO "Treatments" VALUES ("109", "9", "4");
INSERT INTO "Treatments" VALUES ("110", "10", "7");