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 "constructors" VALUES ("6", "AlphaTauri", "Italian");
INSERT INTO "constructors" VALUES ("7", "Aston Martin", "British");
INSERT INTO "constructors" VALUES ("8", "Williams", "British");
INSERT INTO "constructors" VALUES ("9", "Sauber", "Swiss");
INSERT INTO "constructors" VALUES ("10", "Haas", "American");
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", "Charles", "Leclerc", "1997-10-16", "Monegasque");
INSERT INTO "drivers" VALUES ("4", "Yuki", "Tsunoda", "2000-05-11", "Japanese");
INSERT INTO "drivers" VALUES ("5", "Daniel", "Ricciardo", "1989-07-01", "Australian");
INSERT INTO "drivers" VALUES ("6", "Sergio", "Perez", "1990-01-26", "Mexican");
INSERT INTO "drivers" VALUES ("7", "George", "Russell", "1998-02-15", "British");
INSERT INTO "drivers" VALUES ("8", "Pierre", "Gasly", "1996-02-07", "French");
INSERT INTO "drivers" VALUES ("9", "Lando", "Norris", "1999-11-13", "British");
INSERT INTO "drivers" VALUES ("10", "Fernando", "Alonso", "1981-07-29", "Spanish");
INSERT INTO "drivers" VALUES ("11", "Kamui", "Kobayashi", "1986-09-13", "Japanese");
INSERT INTO "drivers" VALUES ("12", "Takuma", "Sato", "1977-01-28", "Japanese");
INSERT INTO "drivers" VALUES ("13", "Kazuki", "Nakajima", "1985-01-11", "Japanese");
INSERT INTO "drivers" VALUES ("14", "Naoki", "Yamamoto", "1988-07-11", "Japanese");
INSERT INTO "drivers" VALUES ("15", "Jenson", "Button", "1980-01-19", "British");
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", "Emilia Romagna Grand Prix");
INSERT INTO "races" VALUES ("5", "Miami Grand Prix");
INSERT INTO "races" VALUES ("6", "Spanish Grand Prix");
INSERT INTO "races" VALUES ("7", "Monaco Grand Prix");
INSERT INTO "races" VALUES ("8", "Azerbaijan Grand Prix");
INSERT INTO "races" VALUES ("9", "Canadian Grand Prix");
INSERT INTO "races" VALUES ("10", "British Grand Prix");