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,
"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,
"year" INT,
PRIMARY KEY ("raceId")
);



INSERT INTO "constructors" VALUES ("1", "British");
INSERT INTO "constructors" VALUES ("2", "German");
INSERT INTO "constructors" VALUES ("3", "Italian");
INSERT INTO "constructors" VALUES ("4", "French");
INSERT INTO "constructors" VALUES ("5", "American");
INSERT INTO "drivers" VALUES ("1", "Lewis", "Hamilton", "1985-01-07", "British");
INSERT INTO "drivers" VALUES ("2", "George", "Russell", "1998-02-15", "British");
INSERT INTO "drivers" VALUES ("3", "Max", "Verstappen", "1997-09-30", "Dutch");
INSERT INTO "drivers" VALUES ("4", "Sebastian", "Vettel", "1987-07-03", "German");
INSERT INTO "drivers" VALUES ("5", "Fernando", "Alonso", "1981-07-29", "Spanish");
INSERT INTO "drivers" VALUES ("6", "Lando", "Norris", "1999-11-13", "British");
INSERT INTO "drivers" VALUES ("7", "Daniel", "Ricciardo", "1989-07-01", "Australian");
INSERT INTO "drivers" VALUES ("8", "Jenson", "Button", "1980-01-19", "British");
INSERT INTO "drivers" VALUES ("9", "Nigel", "Mansell", "1953-08-08", "British");
INSERT INTO "drivers" VALUES ("10", "Jim", "Clark", "1936-03-04", "British");
INSERT INTO "drivers" VALUES ("11", "Jackie", "Stewart", "1939-06-11", "British");
INSERT INTO "drivers" VALUES ("12", "Charles", "Leclerc", "1997-10-16", "Monegasque");
INSERT INTO "drivers" VALUES ("13", "Carlos", "Sainz", "1994-09-01", "Spanish");
INSERT INTO "drivers" VALUES ("14", "Valtteri", "Bottas", "1989-08-28", "Finnish");
INSERT INTO "drivers" VALUES ("15", "Esteban", "Ocon", "1996-09-17", "French");
INSERT INTO "races" VALUES ("1", "2023");
INSERT INTO "races" VALUES ("2", "2022");
INSERT INTO "races" VALUES ("3", "2021");
INSERT INTO "races" VALUES ("4", "2020");
INSERT INTO "races" VALUES ("5", "2019");