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 "Breeds" (
"breed_code" VARCHAR(10),
"breed_name" VARCHAR(80),
PRIMARY KEY ("breed_code")
);

CREATE TABLE "Dogs" (
"dog_id" INT,
"abandoned_yn" VARCHAR(1),
"name" VARCHAR(50),
"age" VARCHAR(20),
"weight" VARCHAR(20),
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Owners" (
"owner_id" INT,
"email_address" VARCHAR(50),
PRIMARY KEY ("owner_id")
);

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





INSERT INTO "Breeds" VALUES ("BD001", "Labrador Retriever");
INSERT INTO "Breeds" VALUES ("BD002", "German Shepherd");
INSERT INTO "Breeds" VALUES ("BD003", "Beagle");
INSERT INTO "Breeds" VALUES ("BD004", "Bulldog");
INSERT INTO "Breeds" VALUES ("BD005", "Poodle");
INSERT INTO "Dogs" VALUES ("1", "1", "Max", "5 years", "30 kg");
INSERT INTO "Dogs" VALUES ("2", "0", "Bella", "3 years", "25 kg");
INSERT INTO "Dogs" VALUES ("3", "1", "Charlie", "2 years", "20 kg");
INSERT INTO "Dogs" VALUES ("4", "0", "Lucy", "4 years", "22 kg");
INSERT INTO "Dogs" VALUES ("5", "1", "Daisy", "1 year", "15 kg");
INSERT INTO "Dogs" VALUES ("6", "0", "Molly", "6 years", "28 kg");
INSERT INTO "Dogs" VALUES ("7", "1", "Buddy", "7 years", "35 kg");
INSERT INTO "Dogs" VALUES ("8", "0", "Lola", "3 years", "18 kg");
INSERT INTO "Dogs" VALUES ("9", "1", "Rocky", "8 years", "40 kg");
INSERT INTO "Dogs" VALUES ("10", "0", "Sadie", "5 years", "23 kg");
INSERT INTO "Owners" VALUES ("1", "owner1@example.com");
INSERT INTO "Owners" VALUES ("2", "owner2@example.com");
INSERT INTO "Owners" VALUES ("3", "owner3@example.com");
INSERT INTO "Owners" VALUES ("4", "owner4@example.com");
INSERT INTO "Owners" VALUES ("5", "owner5@example.com");
INSERT INTO "Sizes" VALUES ("SZ001", "Small");
INSERT INTO "Sizes" VALUES ("SZ002", "Medium");
INSERT INTO "Sizes" VALUES ("SZ003", "Large");
INSERT INTO "Sizes" VALUES ("SZ004", "Extra Large");