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 "Charges" (
"charge_id" INT,
"charge_amount" DECIMAL(19, 4),
PRIMARY KEY ("charge_id")
);

CREATE TABLE "Dogs" (
"dog_id" INT UNIQUE,
"owner_id" INT,
"name" VARCHAR(50),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("owner_id") REFERENCES "Owners"("owner_id")
);

CREATE TABLE "Owners" (
"owner_id" INT UNIQUE,
"first_name" VARCHAR(50),
"last_name" VARCHAR(50),
PRIMARY KEY ("owner_id")
);

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 "Charges" VALUES ("1", "100.00");
INSERT INTO "Charges" VALUES ("2", "50.00");
INSERT INTO "Charges" VALUES ("3", "200.00");
INSERT INTO "Charges" VALUES ("4", "75.00");
INSERT INTO "Charges" VALUES ("5", "120.00");
INSERT INTO "Owners" VALUES ("1", "Alice", "Smith");
INSERT INTO "Owners" VALUES ("2", "Bob", "Johnson");
INSERT INTO "Owners" VALUES ("3", "Charlie", "Brown");
INSERT INTO "Owners" VALUES ("4", "Diana", "Miller");
INSERT INTO "Owners" VALUES ("5", "Eve", "Davis");
INSERT INTO "Owners" VALUES ("6", "Frank", "Wilson");
INSERT INTO "Dogs" VALUES ("101", "1", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "1", "Lucy");
INSERT INTO "Dogs" VALUES ("103", "2", "Max");
INSERT INTO "Dogs" VALUES ("104", "2", "Bella");
INSERT INTO "Dogs" VALUES ("105", "3", "Charlie");
INSERT INTO "Dogs" VALUES ("106", "4", "Daisy");
INSERT INTO "Dogs" VALUES ("107", "5", "Rocky");
INSERT INTO "Dogs" VALUES ("108", "5", "Luna");
INSERT INTO "Dogs" VALUES ("109", "6", "Cooper");
INSERT INTO "Dogs" VALUES ("110", "6", "Sophie");
INSERT INTO "Treatments" VALUES ("1001", "101", "50.00");
INSERT INTO "Treatments" VALUES ("1002", "101", "75.00");
INSERT INTO "Treatments" VALUES ("1003", "102", "100.00");
INSERT INTO "Treatments" VALUES ("1004", "103", "200.00");
INSERT INTO "Treatments" VALUES ("1005", "104", "150.00");
INSERT INTO "Treatments" VALUES ("1006", "105", "300.00");
INSERT INTO "Treatments" VALUES ("1007", "106", "80.00");
INSERT INTO "Treatments" VALUES ("1008", "107", "120.00");
INSERT INTO "Treatments" VALUES ("1009", "108", "90.00");
INSERT INTO "Treatments" VALUES ("1010", "109", "250.00");
INSERT INTO "Treatments" VALUES ("1011", "110", "110.00");
INSERT INTO "Treatments" VALUES ("1012", "101", "20.00");
INSERT INTO "Treatments" VALUES ("1013", "102", "30.00");
INSERT INTO "Treatments" VALUES ("1014", "103", "40.00");
INSERT INTO "Treatments" VALUES ("1015", "105", "50.00");
INSERT INTO "Treatments" VALUES ("1016", "107", "60.00");
INSERT INTO "Treatments" VALUES ("1017", "109", "70.00");