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,
"lat" FLOAT,
"lng" FLOAT,
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", "Silverstone Circuit", "United Kingdom", "52.0786", "-1.0169");
INSERT INTO "circuits" VALUES ("2", "Monza Circuit", "Italy", "45.6156", "9.2811");
INSERT INTO "circuits" VALUES ("3", "Spa-Francorchamps", "Belgium", "50.4372", "5.9714");
INSERT INTO "circuits" VALUES ("4", "Suzuka Circuit", "Japan", "34.8431", "136.5410");
INSERT INTO "circuits" VALUES ("5", "Circuit of the Americas", "USA", "30.1328", "-97.6411");
INSERT INTO "constructors" VALUES ("1", "British");
INSERT INTO "constructors" VALUES ("2", "Italian");
INSERT INTO "constructors" VALUES ("3", "German");
INSERT INTO "constructors" VALUES ("4", "Japanese");
INSERT INTO "constructors" VALUES ("5", "American");
INSERT INTO "drivers" VALUES ("1", "British");
INSERT INTO "drivers" VALUES ("2", "German");
INSERT INTO "drivers" VALUES ("3", "Italian");
INSERT INTO "drivers" VALUES ("4", "Spanish");
INSERT INTO "drivers" VALUES ("5", "Brazilian");