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 "circuits" (
"circuitId" INT,
"name" TEXT,
"country" TEXT,
PRIMARY KEY ("circuitId")
);

CREATE TABLE "races" (
"raceId" INT,
"year" INT,
"name" TEXT,
"date" DATE,
PRIMARY KEY ("raceId")
);



INSERT INTO "circuits" VALUES ("1", "Silverstone Circuit", "United Kingdom");
INSERT INTO "circuits" VALUES ("2", "Circuit de Monaco", "Monaco");
INSERT INTO "circuits" VALUES ("3", "Suzuka Circuit", "Japan");
INSERT INTO "circuits" VALUES ("4", "Circuit Gilles Villeneuve", "Canada");
INSERT INTO "circuits" VALUES ("5", "Marina Bay Street Circuit", "Singapore");
INSERT INTO "circuits" VALUES ("6", "Circuit of the Americas", "USA");
INSERT INTO "circuits" VALUES ("7", "Red Bull Ring", "Austria");
INSERT INTO "circuits" VALUES ("8", "Baku City Circuit", "Azerbaijan");
INSERT INTO "circuits" VALUES ("9", "Hockenheimring", "Germany");
INSERT INTO "circuits" VALUES ("10", "Circuit Paul Ricard", "France");
INSERT INTO "races" VALUES ("101", "2000", "British Grand Prix", "2000-07-16");
INSERT INTO "races" VALUES ("102", "2000", "Monaco Grand Prix", "2000-05-28");
INSERT INTO "races" VALUES ("103", "2000", "Japanese Grand Prix", "2000-10-08");
INSERT INTO "races" VALUES ("104", "2000", "Canadian Grand Prix", "2000-06-18");
INSERT INTO "races" VALUES ("105", "2000", "Singapore Grand Prix", "2000-09-24");
INSERT INTO "races" VALUES ("106", "2000", "United States Grand Prix", "2000-06-04");
INSERT INTO "races" VALUES ("107", "2000", "German Grand Prix", "2000-07-30");
INSERT INTO "races" VALUES ("108", "2000", "French Grand Prix", "2000-07-02");
INSERT INTO "races" VALUES ("201", "2017", "British Grand Prix", "2017-07-16");
INSERT INTO "races" VALUES ("202", "2017", "Monaco Grand Prix", "2017-05-28");
INSERT INTO "races" VALUES ("203", "2017", "Japanese Grand Prix", "2017-10-08");
INSERT INTO "races" VALUES ("204", "2017", "Canadian Grand Prix", "2017-06-18");
INSERT INTO "races" VALUES ("205", "2017", "Singapore Grand Prix", "2017-09-17");
INSERT INTO "races" VALUES ("206", "2017", "United States Grand Prix", "2017-10-22");
INSERT INTO "races" VALUES ("207", "2017", "Azerbaijan Grand Prix", "2017-06-25");
INSERT INTO "races" VALUES ("208", "2017", "Austrian Grand Prix", "2017-07-09");
INSERT INTO "races" VALUES ("209", "2017", "German Grand Prix", "2017-07-30");
INSERT INTO "races" VALUES ("210", "2017", "French Grand Prix", "2017-06-25");
INSERT INTO "races" VALUES ("211", "2017", "European Grand Prix", "2017-05-07");
INSERT INTO "races" VALUES ("301", "2001", "Austrian Grand Prix", "2001-06-17");
INSERT INTO "races" VALUES ("302", "2002", "European Grand Prix", "2002-04-21");
INSERT INTO "races" VALUES ("303", "2010", "Korean Grand Prix", "2010-10-24");
INSERT INTO "races" VALUES ("304", "2017", "Korean Grand Prix", "2017-10-01");