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,
"owner_id" INT,
"abandoned_yn" VARCHAR(1),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("owner_id") REFERENCES "Owners"("owner_id")
);

CREATE TABLE "Owners" (
"owner_id" INT UNIQUE,
"city" VARCHAR(50),
"zip_code" VARCHAR(20),
PRIMARY KEY ("owner_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,
"dog_id" INT,
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("dog_id") REFERENCES "Dogs"("dog_id")
);





INSERT INTO "Owners" VALUES ("1", "New York", "10001");
INSERT INTO "Owners" VALUES ("2", "Los Angeles", "90001");
INSERT INTO "Owners" VALUES ("3", "Chicago", "60601");
INSERT INTO "Owners" VALUES ("4", "Houston", "77001");
INSERT INTO "Owners" VALUES ("5", "Phoenix", "85001");
INSERT INTO "Owners" VALUES ("6", "Philadelphia", "19101");
INSERT INTO "Owners" VALUES ("7", "San Antonio", "78201");
INSERT INTO "Owners" VALUES ("8", "San Diego", "92101");
INSERT INTO "Owners" VALUES ("9", "Dallas", "75201");
INSERT INTO "Owners" VALUES ("10", "San Jose", "95101");
INSERT INTO "Dogs" VALUES ("101", "1", "N");
INSERT INTO "Dogs" VALUES ("102", "1", "N");
INSERT INTO "Dogs" VALUES ("103", "2", "N");
INSERT INTO "Dogs" VALUES ("104", "2", "N");
INSERT INTO "Dogs" VALUES ("105", "3", "N");
INSERT INTO "Dogs" VALUES ("106", "3", "Y");
INSERT INTO "Dogs" VALUES ("107", "4", "N");
INSERT INTO "Dogs" VALUES ("108", "5", "N");
INSERT INTO "Dogs" VALUES ("109", "6", "N");
INSERT INTO "Dogs" VALUES ("110", "7", "N");
INSERT INTO "Dogs" VALUES ("111", "8", "N");
INSERT INTO "Dogs" VALUES ("112", "9", "N");
INSERT INTO "Dogs" VALUES ("113", "10", "N");
INSERT INTO "Dogs" VALUES ("114", "1", "N");
INSERT INTO "Dogs" VALUES ("115", "2", "N");
INSERT INTO "Dogs" VALUES ("116", "3", "N");
INSERT INTO "Dogs" VALUES ("117", "4", "N");
INSERT INTO "Dogs" VALUES ("118", "5", "N");
INSERT INTO "Dogs" VALUES ("119", "6", "N");
INSERT INTO "Dogs" VALUES ("120", "7", "N");
INSERT INTO "Treatment_Types" VALUES ("VACC", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("SURG", "Surgery");
INSERT INTO "Treatment_Types" VALUES ("CHECK", "Annual Check-up");
INSERT INTO "Treatment_Types" VALUES ("DENT", "Dental Cleaning");
INSERT INTO "Treatment_Types" VALUES ("GROOM", "Grooming");
INSERT INTO "Treatment_Types" VALUES ("EMERG", "Emergency Visit");
INSERT INTO "Treatment_Types" VALUES ("MEDS", "Medication Dispensing");
INSERT INTO "Treatment_Types" VALUES ("XRAY", "X-Ray");
INSERT INTO "Treatment_Types" VALUES ("BLOOD", "Blood Test");
INSERT INTO "Treatment_Types" VALUES ("PHYS", "Physical Therapy");
INSERT INTO "Treatments" VALUES ("1", "101", "150.00");
INSERT INTO "Treatments" VALUES ("2", "101", "50.00");
INSERT INTO "Treatments" VALUES ("3", "102", "200.00");
INSERT INTO "Treatments" VALUES ("4", "103", "100.00");
INSERT INTO "Treatments" VALUES ("5", "104", "300.00");
INSERT INTO "Treatments" VALUES ("6", "105", "500.00");
INSERT INTO "Treatments" VALUES ("7", "106", "25.00");
INSERT INTO "Treatments" VALUES ("8", "107", "75.00");
INSERT INTO "Treatments" VALUES ("9", "108", "120.00");
INSERT INTO "Treatments" VALUES ("10", "109", "80.00");
INSERT INTO "Treatments" VALUES ("11", "110", "180.00");
INSERT INTO "Treatments" VALUES ("12", "111", "220.00");
INSERT INTO "Treatments" VALUES ("13", "112", "90.00");
INSERT INTO "Treatments" VALUES ("14", "113", "110.00");
INSERT INTO "Treatments" VALUES ("15", "114", "60.00");
INSERT INTO "Treatments" VALUES ("16", "115", "130.00");
INSERT INTO "Treatments" VALUES ("17", "116", "170.00");
INSERT INTO "Treatments" VALUES ("18", "117", "210.00");
INSERT INTO "Treatments" VALUES ("19", "118", "240.00");
INSERT INTO "Treatments" VALUES ("20", "119", "260.00");
INSERT INTO "Treatments" VALUES ("21", "120", "280.00");
INSERT INTO "Treatments" VALUES ("22", "101", "300.00");
INSERT INTO "Treatments" VALUES ("23", "102", "400.00");
INSERT INTO "Treatments" VALUES ("24", "103", "50.00");
INSERT INTO "Treatments" VALUES ("25", "104", "100.00");
INSERT INTO "Treatments" VALUES ("26", "105", "200.00");
INSERT INTO "Treatments" VALUES ("27", "106", "15.00");
INSERT INTO "Treatments" VALUES ("28", "107", "35.00");
INSERT INTO "Treatments" VALUES ("29", "108", "60.00");
INSERT INTO "Treatments" VALUES ("30", "109", "40.00");
INSERT INTO "Treatments" VALUES ("31", "110", "90.00");
INSERT INTO "Treatments" VALUES ("32", "111", "110.00");
INSERT INTO "Treatments" VALUES ("33", "112", "45.00");
INSERT INTO "Treatments" VALUES ("34", "113", "55.00");
INSERT INTO "Treatments" VALUES ("35", "114", "30.00");
INSERT INTO "Treatments" VALUES ("36", "115", "65.00");
INSERT INTO "Treatments" VALUES ("37", "116", "85.00");
INSERT INTO "Treatments" VALUES ("38", "117", "105.00");
INSERT INTO "Treatments" VALUES ("39", "118", "120.00");
INSERT INTO "Treatments" VALUES ("40", "119", "130.00");
INSERT INTO "Treatments" VALUES ("41", "120", "140.00");
INSERT INTO "Treatments" VALUES ("42", "101", "500.00");
INSERT INTO "Treatments" VALUES ("43", "102", "600.00");
INSERT INTO "Treatments" VALUES ("44", "103", "700.00");
INSERT INTO "Treatments" VALUES ("45", "104", "800.00");
INSERT INTO "Treatments" VALUES ("46", "105", "900.00");
INSERT INTO "Treatments" VALUES ("47", "106", "10.00");
INSERT INTO "Treatments" VALUES ("48", "107", "20.00");
INSERT INTO "Treatments" VALUES ("49", "108", "30.00");
INSERT INTO "Treatments" VALUES ("50", "109", "40.00");
INSERT INTO "Treatments" VALUES ("51", "110", "50.00");
INSERT INTO "Treatments" VALUES ("52", "111", "60.00");
INSERT INTO "Treatments" VALUES ("53", "112", "70.00");
INSERT INTO "Treatments" VALUES ("54", "113", "80.00");
INSERT INTO "Treatments" VALUES ("55", "114", "90.00");
INSERT INTO "Treatments" VALUES ("56", "115", "100.00");
INSERT INTO "Treatments" VALUES ("57", "116", "110.00");
INSERT INTO "Treatments" VALUES ("58", "117", "120.00");
INSERT INTO "Treatments" VALUES ("59", "118", "130.00");
INSERT INTO "Treatments" VALUES ("60", "119", "140.00");
INSERT INTO "Treatments" VALUES ("61", "120", "150.00");