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

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

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



INSERT INTO "circuits" VALUES ("1", "Australia");
INSERT INTO "circuits" VALUES ("2", "Malaysia");
INSERT INTO "circuits" VALUES ("3", "Bahrain");
INSERT INTO "circuits" VALUES ("4", "Spain");
INSERT INTO "circuits" VALUES ("5", "Monaco");
INSERT INTO "circuits" VALUES ("6", "Canada");
INSERT INTO "circuits" VALUES ("7", "France");
INSERT INTO "circuits" VALUES ("8", "Great Britain");
INSERT INTO "circuits" VALUES ("9", "Germany");
INSERT INTO "circuits" VALUES ("10", "Hungary");
INSERT INTO "constructors" VALUES ("1", "McLaren", "British");
INSERT INTO "constructors" VALUES ("2", "Ferrari", "Italian");
INSERT INTO "constructors" VALUES ("3", "Williams", "British");
INSERT INTO "constructors" VALUES ("4", "Renault", "French");
INSERT INTO "constructors" VALUES ("5", "Sauber", "Swiss");
INSERT INTO "constructors" VALUES ("6", "Red Bull", "Austrian");
INSERT INTO "constructors" VALUES ("7", "Mercedes", "German");
INSERT INTO "constructors" VALUES ("8", "Force India", "Indian");
INSERT INTO "constructors" VALUES ("9", "Toro Rosso", "Italian");
INSERT INTO "constructors" VALUES ("10", "Haas F1 Team", "American");
INSERT INTO "drivers" VALUES ("1", "hamilton", "1985-01-07", "British");
INSERT INTO "drivers" VALUES ("2", "vettel", "1987-07-03", "German");
INSERT INTO "drivers" VALUES ("3", "alonso", "1981-07-29", "Spanish");
INSERT INTO "drivers" VALUES ("4", "raikkonen", "1979-10-17", "Finnish");
INSERT INTO "drivers" VALUES ("5", "rosberg", "1985-06-27", "German");
INSERT INTO "drivers" VALUES ("6", "schumacher", "1969-01-03", "German");
INSERT INTO "drivers" VALUES ("7", "hulkenberg", "1987-08-19", "German");
INSERT INTO "drivers" VALUES ("8", "bottas", "1989-08-28", "Finnish");
INSERT INTO "drivers" VALUES ("9", "ricciardo", "1989-07-01", "Australian");
INSERT INTO "drivers" VALUES ("10", "verstappen", "1997-09-30", "Dutch");
INSERT INTO "drivers" VALUES ("11", "kubica", "1984-12-07", "Polish");
INSERT INTO "drivers" VALUES ("12", "sainz", "1994-09-01", "Spanish");
INSERT INTO "drivers" VALUES ("13", "vandoorne", "1992-03-26", "Belgian");
INSERT INTO "drivers" VALUES ("14", "wehrlein", "1994-10-18", "German");
INSERT INTO "drivers" VALUES ("15", "grosjean", "1986-04-17", "French");