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,
"breed_code" VARCHAR(10),
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Professionals" (
"professional_id" INT UNIQUE,
"role_code" VARCHAR(10),
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", "Labrador");
INSERT INTO "Dogs" VALUES ("2", "Beagle");
INSERT INTO "Dogs" VALUES ("3", "Bulldog");
INSERT INTO "Dogs" VALUES ("4", "Poodle");
INSERT INTO "Dogs" VALUES ("5", "German Shepherd");
INSERT INTO "Dogs" VALUES ("6", "Chihuahua");
INSERT INTO "Dogs" VALUES ("7", "Dachshund");
INSERT INTO "Dogs" VALUES ("8", "Boxer");
INSERT INTO "Dogs" VALUES ("9", "Siberian Husky");
INSERT INTO "Dogs" VALUES ("10", "Great Dane");
INSERT INTO "Professionals" VALUES ("101", "Vet");
INSERT INTO "Professionals" VALUES ("102", "Groomer");
INSERT INTO "Professionals" VALUES ("103", "Trainer");
INSERT INTO "Professionals" VALUES ("104", "Vet");
INSERT INTO "Professionals" VALUES ("105", "Groomer");
INSERT INTO "Professionals" VALUES ("106", "Trainer");
INSERT INTO "Professionals" VALUES ("107", "Vet");
INSERT INTO "Professionals" VALUES ("108", "Groomer");
INSERT INTO "Professionals" VALUES ("109", "Trainer");
INSERT INTO "Professionals" VALUES ("110", "Vet");
INSERT INTO "Treatments" VALUES ("1001", "1", "101", "Vaccination");
INSERT INTO "Treatments" VALUES ("1002", "2", "102", "Bathing");
INSERT INTO "Treatments" VALUES ("1003", "3", "103", "Obedience");
INSERT INTO "Treatments" VALUES ("1004", "4", "104", "Checkup");
INSERT INTO "Treatments" VALUES ("1005", "5", "105", "Haircut");
INSERT INTO "Treatments" VALUES ("1006", "6", "106", "Agility");
INSERT INTO "Treatments" VALUES ("1007", "7", "107", "Surgery");
INSERT INTO "Treatments" VALUES ("1008", "8", "108", "Nail Trim");
INSERT INTO "Treatments" VALUES ("1009", "9", "109", "Behavior");
INSERT INTO "Treatments" VALUES ("1010", "10", "110", "Dental");
INSERT INTO "Treatments" VALUES ("1011", "1", "102", "Grooming");
INSERT INTO "Treatments" VALUES ("1012", "2", "101", "Checkup");
INSERT INTO "Treatments" VALUES ("1013", "3", "105", "Bathing");
INSERT INTO "Treatments" VALUES ("1014", "4", "106", "Training");
INSERT INTO "Treatments" VALUES ("1015", "5", "107", "Vaccination");
INSERT INTO "Treatments" VALUES ("1016", "6", "108", "Grooming");
INSERT INTO "Treatments" VALUES ("1017", "7", "109", "Obedience");
INSERT INTO "Treatments" VALUES ("1018", "8", "110", "Surgery");
INSERT INTO "Treatments" VALUES ("1019", "9", "101", "Dental");
INSERT INTO "Treatments" VALUES ("1020", "10", "102", "Nail Trim");