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", "Albert Park Grand Prix Circuit", "Australia");
INSERT INTO "circuits" VALUES ("2", "Circuit de Monaco", "Monaco");
INSERT INTO "circuits" VALUES ("3", "Silverstone Circuit", "United Kingdom");
INSERT INTO "circuits" VALUES ("4", "Circuit Gilles Villeneuve", "Canada");
INSERT INTO "circuits" VALUES ("5", "Suzuka Circuit", "Japan");
INSERT INTO "races" VALUES ("101", "2000", "Australian Grand Prix", "2000-03-12");
INSERT INTO "races" VALUES ("102", "2000", "Monaco Grand Prix", "2000-05-28");
INSERT INTO "races" VALUES ("103", "2000", "British Grand Prix", "2000-07-16");
INSERT INTO "races" VALUES ("104", "2000", "Canadian Grand Prix", "2000-06-18");
INSERT INTO "races" VALUES ("201", "2017", "Australian Grand Prix", "2017-03-26");
INSERT INTO "races" VALUES ("202", "2017", "Monaco Grand Prix", "2017-05-28");
INSERT INTO "races" VALUES ("203", "2017", "British Grand Prix", "2017-07-16");
INSERT INTO "races" VALUES ("204", "2017", "Japanese Grand Prix", "2017-10-08");
INSERT INTO "races" VALUES ("205", "2017", "Azerbaijan Grand Prix", "2017-06-25");