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 "Owners" (
"owner_id" INT,
"last_name" VARCHAR(50),
"cell_number" VARCHAR(20),
PRIMARY KEY ("owner_id")
);

CREATE TABLE "Professionals" (
"professional_id" INT UNIQUE,
"first_name" VARCHAR(50),
"state" VARCHAR(20),
"last_name" VARCHAR(50),
"cell_number" VARCHAR(20),
PRIMARY KEY ("professional_id")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"professional_id" INT,
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id")
);





INSERT INTO "Owners" VALUES ("1", "Smith", "555-1234");
INSERT INTO "Owners" VALUES ("2", "Jones", "555-5678");
INSERT INTO "Owners" VALUES ("3", "Williams", "555-9012");
INSERT INTO "Owners" VALUES ("4", "Brown", "555-3456");
INSERT INTO "Owners" VALUES ("5", "Davis", "555-7890");
INSERT INTO "Owners" VALUES ("6", "Miller", "555-2345");
INSERT INTO "Owners" VALUES ("7", "Wilson", "555-6789");
INSERT INTO "Owners" VALUES ("8", "Moore", "555-0123");
INSERT INTO "Owners" VALUES ("9", "Taylor", "555-4567");
INSERT INTO "Owners" VALUES ("10", "Anderson", "555-8901");
INSERT INTO "Professionals" VALUES ("101", "Alice", "Indiana", "Johnson", "555-1111");
INSERT INTO "Professionals" VALUES ("102", "Bob", "Ohio", "Williams", "555-2222");
INSERT INTO "Professionals" VALUES ("103", "Charlie", "Indiana", "Brown", "555-3333");
INSERT INTO "Professionals" VALUES ("104", "Diana", "Illinois", "Davis", "555-4444");
INSERT INTO "Professionals" VALUES ("105", "Eve", "Indiana", "Miller", "555-5555");
INSERT INTO "Professionals" VALUES ("106", "Frank", "Michigan", "Wilson", "555-6666");
INSERT INTO "Professionals" VALUES ("107", "Grace", "Indiana", "Moore", "555-7777");
INSERT INTO "Professionals" VALUES ("108", "Henry", "Kentucky", "Taylor", "555-8888");
INSERT INTO "Professionals" VALUES ("109", "Ivy", "Ohio", "Anderson", "555-9999");
INSERT INTO "Professionals" VALUES ("110", "Jack", "Indiana", "Thomas", "555-0000");
INSERT INTO "Treatments" VALUES ("1", "101");
INSERT INTO "Treatments" VALUES ("2", "101");
INSERT INTO "Treatments" VALUES ("3", "102");
INSERT INTO "Treatments" VALUES ("4", "102");
INSERT INTO "Treatments" VALUES ("5", "102");
INSERT INTO "Treatments" VALUES ("6", "103");
INSERT INTO "Treatments" VALUES ("7", "104");
INSERT INTO "Treatments" VALUES ("8", "104");
INSERT INTO "Treatments" VALUES ("9", "104");
INSERT INTO "Treatments" VALUES ("10", "104");
INSERT INTO "Treatments" VALUES ("11", "105");
INSERT INTO "Treatments" VALUES ("12", "106");
INSERT INTO "Treatments" VALUES ("13", "106");
INSERT INTO "Treatments" VALUES ("14", "107");
INSERT INTO "Treatments" VALUES ("15", "108");
INSERT INTO "Treatments" VALUES ("16", "108");
INSERT INTO "Treatments" VALUES ("17", "108");
INSERT INTO "Treatments" VALUES ("18", "109");
INSERT INTO "Treatments" VALUES ("19", "110");
INSERT INTO "Treatments" VALUES ("20", "110");
INSERT INTO "Treatments" VALUES ("21", "110");
INSERT INTO "Treatments" VALUES ("22", "110");
INSERT INTO "Treatments" VALUES ("23", "110");