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 "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", "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", "Miller", "diana.miller@example.com");
INSERT INTO "Professionals" VALUES ("5", "TRAINER", "Eve", "Davis", "eve.davis@example.com");
INSERT INTO "Professionals" VALUES ("6", "GROOMER", "Frank", "Wilson", "frank.wilson@example.com");
INSERT INTO "Professionals" VALUES ("7", "VET", "Grace", "Taylor", "grace.taylor@example.com");
INSERT INTO "Professionals" VALUES ("8", "TRAINER", "Henry", "Moore", "henry.moore@example.com");
INSERT INTO "Professionals" VALUES ("9", "GROOMER", "Ivy", "White", "ivy.white@example.com");
INSERT INTO "Professionals" VALUES ("10", "VET", "Jack", "Green", "jack.green@example.com");
INSERT INTO "Treatments" VALUES ("1", "101", "1");
INSERT INTO "Treatments" VALUES ("2", "102", "1");
INSERT INTO "Treatments" VALUES ("3", "103", "2");
INSERT INTO "Treatments" VALUES ("4", "104", "3");
INSERT INTO "Treatments" VALUES ("5", "105", "4");
INSERT INTO "Treatments" VALUES ("6", "106", "5");
INSERT INTO "Treatments" VALUES ("7", "107", "1");
INSERT INTO "Treatments" VALUES ("8", "108", "2");
INSERT INTO "Treatments" VALUES ("9", "109", "4");
INSERT INTO "Treatments" VALUES ("10", "110", "5");