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,
"owner_id" INT,
"name" VARCHAR(50),
"date_of_birth" DATETIME,
PRIMARY KEY ("dog_id"),
FOREIGN KEY ("owner_id") REFERENCES "Owners"("owner_id")
);

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





INSERT INTO "Owners" VALUES ("1", "Alice", "Virginia", "alice@example.com");
INSERT INTO "Owners" VALUES ("2", "Bob", "California", "bob@example.com");
INSERT INTO "Owners" VALUES ("3", "Carol", "Virginia", "carol@example.com");
INSERT INTO "Owners" VALUES ("4", "David", "New York", "david@example.com");
INSERT INTO "Owners" VALUES ("5", "Eve", "Texas", "eve@example.com");
INSERT INTO "Owners" VALUES ("6", "Frank", "Virginia", "frank@example.com");
INSERT INTO "Dogs" VALUES ("101", "1", "Buddy", "2018-05-20");
INSERT INTO "Dogs" VALUES ("102", "1", "Max", "2017-11-15");
INSERT INTO "Dogs" VALUES ("103", "2", "Bella", "2019-01-10");
INSERT INTO "Dogs" VALUES ("104", "3", "Charlie", "2016-07-30");
INSERT INTO "Dogs" VALUES ("105", "3", "Lucy", "2015-03-25");
INSERT INTO "Dogs" VALUES ("106", "4", "Daisy", "2020-12-05");
INSERT INTO "Dogs" VALUES ("107", "5", "Molly", "2014-09-17");
INSERT INTO "Dogs" VALUES ("108", "6", "Rocky", "2013-06-22");
INSERT INTO "Dogs" VALUES ("109", "6", "Lola", "2012-02-14");
INSERT INTO "Dogs" VALUES ("110", "6", "Sadie", "2011-08-08");