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,
"breed_code" VARCHAR(10),
"size_code" VARCHAR(10),
"name" VARCHAR(50),
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("owner_id") REFERENCES "Owners"("owner_id"),
FOREIGN KEY ("size_code") REFERENCES "Sizes"("size_code")
);

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

CREATE TABLE "Sizes" (
"size_code" VARCHAR(10) UNIQUE,
"size_description" VARCHAR(80),
PRIMARY KEY ("size_code")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
PRIMARY KEY ("treatment_id")
);





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", "Garcia");
INSERT INTO "Owners" VALUES ("7", "Grace", "Rodriguez");
INSERT INTO "Owners" VALUES ("8", "Henry", "Martinez");
INSERT INTO "Owners" VALUES ("9", "Ivy", "Hernandez");
INSERT INTO "Owners" VALUES ("10", "Jack", "Lopez");
INSERT INTO "Sizes" VALUES ("S", "Small");
INSERT INTO "Sizes" VALUES ("M", "Medium");
INSERT INTO "Sizes" VALUES ("L", "Large");
INSERT INTO "Sizes" VALUES ("XL", "Extra Large");
INSERT INTO "Sizes" VALUES ("XS", "Extra Small");
INSERT INTO "Dogs" VALUES ("101", "1", "LAB", "L", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "2", "GSD", "L", "Max");
INSERT INTO "Dogs" VALUES ("103", "3", "POO", "M", "Bella");
INSERT INTO "Dogs" VALUES ("104", "4", "CHI", "S", "Daisy");
INSERT INTO "Dogs" VALUES ("105", "5", "BEA", "M", "Lucy");
INSERT INTO "Dogs" VALUES ("106", "6", "DACH", "S", "Rocky");
INSERT INTO "Dogs" VALUES ("107", "7", "BOX", "L", "Duke");
INSERT INTO "Dogs" VALUES ("108", "8", "SHI", "XS", "Molly");
INSERT INTO "Dogs" VALUES ("109", "9", "HUS", "L", "Luna");
INSERT INTO "Dogs" VALUES ("110", "10", "COR", "M", "Charlie");
INSERT INTO "Dogs" VALUES ("111", "1", "GOL", "L", "Cooper");
INSERT INTO "Dogs" VALUES ("112", "2", "BUL", "M", "Sadie");
INSERT INTO "Dogs" VALUES ("113", "3", "YOR", "S", "Bailey");
INSERT INTO "Dogs" VALUES ("114", "4", "AUS", "L", "Zoe");
INSERT INTO "Dogs" VALUES ("115", "5", "ROT", "XL", "Bear");
INSERT INTO "Treatments" VALUES ("1");
INSERT INTO "Treatments" VALUES ("2");
INSERT INTO "Treatments" VALUES ("3");
INSERT INTO "Treatments" VALUES ("4");
INSERT INTO "Treatments" VALUES ("5");