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 "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 "Dogs" VALUES ("101", "1", "LAB", "L", "Buddy");
INSERT INTO "Dogs" VALUES ("102", "1", "POO", "M", "Daisy");
INSERT INTO "Dogs" VALUES ("103", "2", "GSD", "L", "Max");
INSERT INTO "Dogs" VALUES ("104", "3", "CHI", "S", "Bella");
INSERT INTO "Dogs" VALUES ("105", "4", "DACH", "S", "Lucy");
INSERT INTO "Dogs" VALUES ("106", "5", "BEAG", "M", "Rocky");
INSERT INTO "Dogs" VALUES ("107", "6", "BULL", "L", "Duke");
INSERT INTO "Dogs" VALUES ("108", "7", "GOLD", "L", "Sadie");
INSERT INTO "Dogs" VALUES ("109", "7", "YORK", "S", "Milo");
INSERT INTO "Dogs" VALUES ("110", "2", "BOXER", "L", "Zeus");
INSERT INTO "Dogs" VALUES ("111", "3", "PUG", "S", "Coco");
INSERT INTO "Dogs" VALUES ("112", "4", "SHIHTZU", "S", "Chloe");
INSERT INTO "Dogs" VALUES ("113", "5", "HUSKY", "XL", "Luna");
INSERT INTO "Dogs" VALUES ("114", "6", "ROTT", "XL", "Bear");
INSERT INTO "Treatments" VALUES ("1");
INSERT INTO "Treatments" VALUES ("2");
INSERT INTO "Treatments" VALUES ("3");