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 "Dogs" (
"dog_id" INT UNIQUE,
"name" VARCHAR(50),
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Professionals" (
"professional_id" INT UNIQUE,
"first_name" VARCHAR(50),
"last_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 ("dog_id") REFERENCES "Dogs"("dog_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id")
);





INSERT INTO "Dogs" VALUES ("1", "Buddy");
INSERT INTO "Dogs" VALUES ("2", "Lucy");
INSERT INTO "Dogs" VALUES ("3", "Max");
INSERT INTO "Dogs" VALUES ("4", "Daisy");
INSERT INTO "Dogs" VALUES ("5", "Charlie");
INSERT INTO "Dogs" VALUES ("6", "Bella");
INSERT INTO "Dogs" VALUES ("7", "Rocky");
INSERT INTO "Dogs" VALUES ("8", "Luna");
INSERT INTO "Dogs" VALUES ("9", "Cooper");
INSERT INTO "Dogs" VALUES ("10", "Zoe");
INSERT INTO "Professionals" VALUES ("101", "Alice", "Smith");
INSERT INTO "Professionals" VALUES ("102", "Bob", "Johnson");
INSERT INTO "Professionals" VALUES ("103", "Carol", "Williams");
INSERT INTO "Professionals" VALUES ("104", "David", "Brown");
INSERT INTO "Professionals" VALUES ("105", "Eve", "Davis");
INSERT INTO "Professionals" VALUES ("106", "Frank", "Miller");
INSERT INTO "Professionals" VALUES ("107", "Grace", "Wilson");
INSERT INTO "Treatments" VALUES ("1", "1", "101");
INSERT INTO "Treatments" VALUES ("2", "2", "101");
INSERT INTO "Treatments" VALUES ("3", "3", "102");
INSERT INTO "Treatments" VALUES ("4", "4", "103");
INSERT INTO "Treatments" VALUES ("5", "5", "101");
INSERT INTO "Treatments" VALUES ("6", "6", "104");
INSERT INTO "Treatments" VALUES ("7", "7", "102");
INSERT INTO "Treatments" VALUES ("8", "8", "103");
INSERT INTO "Treatments" VALUES ("9", "9", "104");
INSERT INTO "Treatments" VALUES ("10", "10", "101");
INSERT INTO "Treatments" VALUES ("11", "1", "102");
INSERT INTO "Treatments" VALUES ("12", "2", "103");
INSERT INTO "Treatments" VALUES ("13", "3", "104");
INSERT INTO "Treatments" VALUES ("14", "4", "101");
INSERT INTO "Treatments" VALUES ("15", "5", "102");