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

CREATE TABLE "constructors" (
"constructorId" INT,
"name" TEXT,
PRIMARY KEY ("constructorId")
);

CREATE TABLE "drivers" (
"driverId" INT,
"forename" TEXT,
PRIMARY KEY ("driverId")
);

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



INSERT INTO "circuits" VALUES ("1", "albert_park", "Albert Park Grand Prix Circuit");
INSERT INTO "circuits" VALUES ("2", "sepang", "Sepang International Circuit");
INSERT INTO "circuits" VALUES ("3", "bahrain", "Bahrain International Circuit");
INSERT INTO "circuits" VALUES ("4", "catalunya", "Circuit de Barcelona-Catalunya");
INSERT INTO "circuits" VALUES ("5", "istanbul", "Istanbul Park");
INSERT INTO "circuits" VALUES ("6", "monaco", "Circuit de Monaco");
INSERT INTO "circuits" VALUES ("7", "ricard", "Circuit Paul Ricard");
INSERT INTO "circuits" VALUES ("8", "silverstone", "Silverstone Circuit");
INSERT INTO "circuits" VALUES ("9", "hockenheimring", "Hockenheimring");
INSERT INTO "circuits" VALUES ("10", "hungaroring", "Hungaroring");
INSERT INTO "circuits" VALUES ("11", "spa", "Circuit de Spa-Francorchamps");
INSERT INTO "circuits" VALUES ("12", "monza", "Autodromo Nazionale Monza");
INSERT INTO "circuits" VALUES ("13", "marina_bay", "Marina Bay Street Circuit");
INSERT INTO "circuits" VALUES ("14", "suzuka", "Suzuka Circuit");
INSERT INTO "circuits" VALUES ("15", "interlagos", "Autodromo Jose Carlos Pace");
INSERT INTO "constructors" VALUES ("1", "McLaren");
INSERT INTO "constructors" VALUES ("2", "Mercedes");
INSERT INTO "constructors" VALUES ("3", "Ferrari");
INSERT INTO "constructors" VALUES ("4", "Red Bull");
INSERT INTO "constructors" VALUES ("5", "Williams");
INSERT INTO "constructors" VALUES ("6", "Renault");
INSERT INTO "constructors" VALUES ("7", "Force India");
INSERT INTO "constructors" VALUES ("8", "Sauber");
INSERT INTO "constructors" VALUES ("9", "Toro Rosso");
INSERT INTO "constructors" VALUES ("10", "Haas");
INSERT INTO "drivers" VALUES ("1", "Lewis");
INSERT INTO "drivers" VALUES ("2", "Max");
INSERT INTO "drivers" VALUES ("3", "Charles");
INSERT INTO "drivers" VALUES ("4", "Sebastian");
INSERT INTO "drivers" VALUES ("5", "Daniel");
INSERT INTO "drivers" VALUES ("6", "Valtteri");
INSERT INTO "drivers" VALUES ("7", "Sergio");
INSERT INTO "drivers" VALUES ("8", "Carlos");
INSERT INTO "drivers" VALUES ("9", "Lando");
INSERT INTO "drivers" VALUES ("10", "Kimi");
INSERT INTO "races" VALUES ("1", "Australian Grand Prix");
INSERT INTO "races" VALUES ("2", "Malaysian Grand Prix");
INSERT INTO "races" VALUES ("3", "Bahrain Grand Prix");
INSERT INTO "races" VALUES ("4", "Spanish Grand Prix");
INSERT INTO "races" VALUES ("5", "Turkish Grand Prix");
INSERT INTO "races" VALUES ("6", "Monaco Grand Prix");
INSERT INTO "races" VALUES ("7", "French Grand Prix");
INSERT INTO "races" VALUES ("8", "British Grand Prix");
INSERT INTO "races" VALUES ("9", "German Grand Prix");
INSERT INTO "races" VALUES ("10", "Hungarian Grand Prix");
INSERT INTO "races" VALUES ("11", "Belgian Grand Prix");
INSERT INTO "races" VALUES ("12", "Italian Grand Prix");
INSERT INTO "races" VALUES ("13", "Singapore Grand Prix");
INSERT INTO "races" VALUES ("14", "Japanese Grand Prix");
INSERT INTO "races" VALUES ("15", "Brazilian Grand Prix");