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 "CONTESTANTS" (
"contestant_number" INT UNIQUE,
"contestant_name" VARCHAR(50),
PRIMARY KEY ("contestant_number")
);

CREATE TABLE "VOTES" (
"vote_id" INT,
"contestant_number" INT,
PRIMARY KEY ("vote_id"),
FOREIGN KEY ("contestant_number") REFERENCES "CONTESTANTS"("contestant_number")
);





INSERT INTO "CONTESTANTS" VALUES ("1", "Jessie Alloway");
INSERT INTO "CONTESTANTS" VALUES ("2", "Alice Smith");
INSERT INTO "CONTESTANTS" VALUES ("3", "Bob Johnson");
INSERT INTO "CONTESTANTS" VALUES ("4", "Charlie Brown");
INSERT INTO "CONTESTANTS" VALUES ("5", "Diana Prince");
INSERT INTO "CONTESTANTS" VALUES ("6", "Eve Adams");
INSERT INTO "CONTESTANTS" VALUES ("7", "Frank White");
INSERT INTO "CONTESTANTS" VALUES ("8", "Grace Kelly");
INSERT INTO "CONTESTANTS" VALUES ("9", "Heidi Klum");
INSERT INTO "CONTESTANTS" VALUES ("10", "Ivan Drago");
INSERT INTO "VOTES" VALUES ("101", "1");
INSERT INTO "VOTES" VALUES ("102", "2");
INSERT INTO "VOTES" VALUES ("103", "1");
INSERT INTO "VOTES" VALUES ("104", "3");
INSERT INTO "VOTES" VALUES ("105", "2");
INSERT INTO "VOTES" VALUES ("106", "4");
INSERT INTO "VOTES" VALUES ("107", "1");
INSERT INTO "VOTES" VALUES ("108", "5");
INSERT INTO "VOTES" VALUES ("109", "6");
INSERT INTO "VOTES" VALUES ("110", "7");
INSERT INTO "VOTES" VALUES ("111", "8");
INSERT INTO "VOTES" VALUES ("112", "9");
INSERT INTO "VOTES" VALUES ("113", "10");
INSERT INTO "VOTES" VALUES ("114", "1");
INSERT INTO "VOTES" VALUES ("115", "2");
INSERT INTO "VOTES" VALUES ("116", "3");
INSERT INTO "VOTES" VALUES ("117", "4");
INSERT INTO "VOTES" VALUES ("118", "5");
INSERT INTO "VOTES" VALUES ("119", "6");
INSERT INTO "VOTES" VALUES ("120", "7");