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 "constructors" (
"constructorId" INT,
"name" TEXT,
"nationality" TEXT,
PRIMARY KEY ("constructorId")
);

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

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



INSERT INTO "constructors" VALUES ("1", "Mercedes", "German");
INSERT INTO "constructors" VALUES ("2", "Red Bull", "Austrian");
INSERT INTO "constructors" VALUES ("3", "Ferrari", "Italian");
INSERT INTO "constructors" VALUES ("4", "McLaren", "British");
INSERT INTO "constructors" VALUES ("5", "Alpine", "French");
INSERT INTO "drivers" VALUES ("1", "Lewis", "Hamilton", "1985-01-07", "British");
INSERT INTO "drivers" VALUES ("2", "Max", "Verstappen", "1997-09-30", "Dutch");
INSERT INTO "drivers" VALUES ("3", "Sebastian", "Vettel", "1987-07-03", "German");
INSERT INTO "drivers" VALUES ("4", "Daniel", "Ricciardo", "1989-07-01", "Australian");
INSERT INTO "drivers" VALUES ("5", "Valtteri", "Bottas", "1989-08-28", "Finnish");
INSERT INTO "drivers" VALUES ("6", "George", "Russell", "1998-02-15", "British");
INSERT INTO "drivers" VALUES ("7", "Charles", "Leclerc", "1997-10-16", "Monegasque");
INSERT INTO "drivers" VALUES ("8", "Sergio", "Perez", "1990-01-26", "Mexican");
INSERT INTO "drivers" VALUES ("9", "Alexander", "Albon", "1996-03-23", "Thai");
INSERT INTO "drivers" VALUES ("10", "Lando", "Norris", "1999-11-13", "British");
INSERT INTO "drivers" VALUES ("11", "Romain", "Grosjean", "1986-04-17", "French");
INSERT INTO "drivers" VALUES ("12", "Nico", "Hulkenberg", "1987-08-19", "German");
INSERT INTO "drivers" VALUES ("13", "Daniil", "Kvyat", "1994-04-26", "Russian");
INSERT INTO "drivers" VALUES ("14", "Esteban", "Ocon", "1996-09-17", "French");
INSERT INTO "drivers" VALUES ("15", "Pierre", "Gasly", "1996-02-07", "French");
INSERT INTO "drivers" VALUES ("16", "Brendon", "Hartley", "1989-11-10", "New Zealander");
INSERT INTO "drivers" VALUES ("17", "Christian", "Klien", "1983-02-07", "Austrian");
INSERT INTO "drivers" VALUES ("18", "Patrick", "Friesacher", "1980-09-26", "Austrian");
INSERT INTO "drivers" VALUES ("19", "Mark", "Webber", "1976-08-27", "Australian");
INSERT INTO "drivers" VALUES ("20", "Gerhard", "Berger", "1959-08-27", "Austrian");
INSERT INTO "drivers" VALUES ("21", "Alexander", "Wurz", "1974-02-15", "Austrian");
INSERT INTO "drivers" VALUES ("22", "Helmut", "Marko", "1943-04-27", "Austrian");
INSERT INTO "drivers" VALUES ("23", "Karl", "Wendlinger", "1968-12-20", "Austrian");
INSERT INTO "drivers" VALUES ("24", "Roland", "Ratzenberger", "1960-07-04", "Austrian");
INSERT INTO "drivers" VALUES ("25", "Jochen", "Rindt", "1942-04-18", "Austrian");
INSERT INTO "drivers" VALUES ("26", "Niki", "Lauda", "1949-02-22", "Austrian");
INSERT INTO "drivers" VALUES ("27", "Franz", "Tost", "1956-01-20", "Austrian");
INSERT INTO "drivers" VALUES ("28", "Lucas", "Auer", "1994-09-11", "Austrian");
INSERT INTO "drivers" VALUES ("29", "René", "Binder", "1992-01-01", "Austrian");
INSERT INTO "drivers" VALUES ("30", "Philipp", "Eng", "1990-02-29", "Austrian");
INSERT INTO "drivers" VALUES ("31", "Thomas", "Preining", "1998-05-21", "Austrian");
INSERT INTO "drivers" VALUES ("32", "Mick", "Schumacher", "1999-03-22", "German");
INSERT INTO "drivers" VALUES ("33", "Yuki", "Tsunoda", "2000-05-11", "Japanese");
INSERT INTO "drivers" VALUES ("34", "Zhou", "Guanyu", "1999-05-30", "Chinese");
INSERT INTO "drivers" VALUES ("35", "Oscar", "Piastri", "2001-04-06", "Australian");
INSERT INTO "drivers" VALUES ("36", "Logan", "Sargeant", "2000-12-31", "American");
INSERT INTO "drivers" VALUES ("37", "Nyck", "de Vries", "1995-02-06", "Dutch");
INSERT INTO "drivers" VALUES ("38", "Liam", "Lawson", "2002-02-11", "New Zealander");
INSERT INTO "drivers" VALUES ("39", "Jack", "Doohan", "2003-01-20", "Australian");
INSERT INTO "drivers" VALUES ("40", "Frederik", "Vesti", "2002-01-18", "Danish");
INSERT INTO "races" VALUES ("1", "Bahrain Grand Prix");
INSERT INTO "races" VALUES ("2", "Saudi Arabian Grand Prix");
INSERT INTO "races" VALUES ("3", "Australian Grand Prix");
INSERT INTO "races" VALUES ("4", "Azerbaijan Grand Prix");
INSERT INTO "races" VALUES ("5", "Miami Grand Prix");
INSERT INTO "races" VALUES ("6", "Monaco Grand Prix");
INSERT INTO "races" VALUES ("7", "Spanish Grand Prix");
INSERT INTO "races" VALUES ("8", "Canadian Grand Prix");
INSERT INTO "races" VALUES ("9", "Austrian Grand Prix");
INSERT INTO "races" VALUES ("10", "British Grand Prix");