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

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");
INSERT INTO "Professionals" VALUES ("2", "TECH", "Bob", "Jones");
INSERT INTO "Professionals" VALUES ("3", "VET", "Carol", "Taylor");
INSERT INTO "Professionals" VALUES ("4", "GROOM", "David", "Brown");
INSERT INTO "Professionals" VALUES ("5", "TECH", "Eve", "Davis");
INSERT INTO "Professionals" VALUES ("6", "GROOM", "Frank", "Wilson");
INSERT INTO "Professionals" VALUES ("7", "VET", "Grace", "Moore");
INSERT INTO "Professionals" VALUES ("8", "TECH", "Hank", "White");
INSERT INTO "Professionals" VALUES ("9", "GROOM", "Ivy", "Martin");
INSERT INTO "Professionals" VALUES ("10", "VET", "Jack", "Lee");
INSERT INTO "Treatments" VALUES ("101", "1");
INSERT INTO "Treatments" VALUES ("102", "2");
INSERT INTO "Treatments" VALUES ("103", "2");
INSERT INTO "Treatments" VALUES ("104", "4");
INSERT INTO "Treatments" VALUES ("105", "5");
INSERT INTO "Treatments" VALUES ("106", "7");
INSERT INTO "Treatments" VALUES ("107", "7");
INSERT INTO "Treatments" VALUES ("108", "10");