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,
"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,
"treatment_type_code" VARCHAR(10),
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", "Max");
INSERT INTO "Dogs" VALUES ("3", "Bella");
INSERT INTO "Dogs" VALUES ("4", "Charlie");
INSERT INTO "Dogs" VALUES ("5", "Lucy");
INSERT INTO "Dogs" VALUES ("6", "Daisy");
INSERT INTO "Dogs" VALUES ("7", "Molly");
INSERT INTO "Dogs" VALUES ("8", "Bailey");
INSERT INTO "Dogs" VALUES ("9", "Rocky");
INSERT INTO "Dogs" VALUES ("10", "Lola");
INSERT INTO "Professionals" VALUES ("101", "John", "Smith");
INSERT INTO "Professionals" VALUES ("102", "Emily", "Jones");
INSERT INTO "Professionals" VALUES ("103", "Michael", "Brown");
INSERT INTO "Professionals" VALUES ("104", "Sarah", "Davis");
INSERT INTO "Professionals" VALUES ("105", "David", "Wilson");
INSERT INTO "Professionals" VALUES ("106", "Laura", "Moore");
INSERT INTO "Professionals" VALUES ("107", "James", "Taylor");
INSERT INTO "Professionals" VALUES ("108", "Linda", "Anderson");
INSERT INTO "Professionals" VALUES ("109", "Robert", "Thomas");
INSERT INTO "Professionals" VALUES ("110", "Patricia", "Jackson");
INSERT INTO "Treatments" VALUES ("201", "1", "101", "Vaccination");
INSERT INTO "Treatments" VALUES ("202", "2", "101", "Checkup");
INSERT INTO "Treatments" VALUES ("203", "3", "102", "Surgery");
INSERT INTO "Treatments" VALUES ("204", "4", "103", "Dental");
INSERT INTO "Treatments" VALUES ("205", "5", "104", "Vaccination");
INSERT INTO "Treatments" VALUES ("206", "6", "104", "Checkup");
INSERT INTO "Treatments" VALUES ("207", "7", "105", "Surgery");
INSERT INTO "Treatments" VALUES ("208", "8", "106", "Dental");
INSERT INTO "Treatments" VALUES ("209", "9", "106", "Vaccination");
INSERT INTO "Treatments" VALUES ("210", "10", "107", "Checkup");