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,
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 "Treatment_Types" (
"treatment_type_code" VARCHAR(10),
"treatment_type_description" VARCHAR(80),
PRIMARY KEY ("treatment_type_code")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"professional_id" INT,
"treatment_type_code" VARCHAR(10),
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id"),
FOREIGN KEY ("treatment_type_code") REFERENCES "Treatment_Types"("treatment_type_code")
);





INSERT INTO "Dogs" VALUES ("1");
INSERT INTO "Dogs" VALUES ("2");
INSERT INTO "Dogs" VALUES ("3");
INSERT INTO "Dogs" VALUES ("4");
INSERT INTO "Dogs" VALUES ("5");
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", "Eva", "Davis");
INSERT INTO "Treatment_Types" VALUES ("TT01", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("TT02", "Deworming");
INSERT INTO "Treatment_Types" VALUES ("TT03", "Grooming");
INSERT INTO "Treatment_Types" VALUES ("TT04", "Dental Cleaning");
INSERT INTO "Treatment_Types" VALUES ("TT05", "Surgery");
INSERT INTO "Treatments" VALUES ("201", "101", "TT01", "50.00");
INSERT INTO "Treatments" VALUES ("202", "101", "TT02", "30.00");
INSERT INTO "Treatments" VALUES ("203", "102", "TT03", "70.00");
INSERT INTO "Treatments" VALUES ("204", "103", "TT04", "40.00");
INSERT INTO "Treatments" VALUES ("205", "104", "TT05", "200.00");
INSERT INTO "Treatments" VALUES ("206", "105", "TT01", "45.00");
INSERT INTO "Treatments" VALUES ("207", "105", "TT03", "65.00");
INSERT INTO "Treatments" VALUES ("208", "102", "TT02", "25.00");
INSERT INTO "Treatments" VALUES ("209", "103", "TT01", "55.00");
INSERT INTO "Treatments" VALUES ("210", "104", "TT04", "35.00");