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

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

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



INSERT INTO "circuits" VALUES ("1", "Circuit de Spa-Francorchamps", "Belgium", "150");
INSERT INTO "circuits" VALUES ("2", "Autódromo Hermanos Rodríguez", "Mexico", "2240");
INSERT INTO "circuits" VALUES ("3", "Silverstone Circuit", "United Kingdom", "150");
INSERT INTO "circuits" VALUES ("4", "Suzuka Circuit", "Japan", "50");
INSERT INTO "circuits" VALUES ("5", "Circuit Gilles Villeneuve", "Canada", "10");
INSERT INTO "circuits" VALUES ("6", "Interlagos", "Brazil", "800");
INSERT INTO "circuits" VALUES ("7", "Circuit of the Americas", "USA", "220");
INSERT INTO "circuits" VALUES ("8", "Red Bull Ring", "Austria", "650");
INSERT INTO "circuits" VALUES ("9", "Mount Panorama Circuit", "Australia", "600");
INSERT INTO "circuits" VALUES ("10", "Circuit Paul Ricard", "France", "100");
INSERT INTO "constructors" VALUES ("1", "British");
INSERT INTO "constructors" VALUES ("2", "Italian");
INSERT INTO "constructors" VALUES ("3", "German");
INSERT INTO "constructors" VALUES ("4", "French");
INSERT INTO "constructors" VALUES ("5", "Japanese");
INSERT INTO "drivers" VALUES ("1", "British");
INSERT INTO "drivers" VALUES ("2", "German");
INSERT INTO "drivers" VALUES ("3", "Brazilian");
INSERT INTO "drivers" VALUES ("4", "Mexican");
INSERT INTO "drivers" VALUES ("5", "Japanese");