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 "driverStandings" (
"driverStandingsId" INT,
"wins" INT,
PRIMARY KEY ("driverStandingsId")
);

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

CREATE TABLE "qualifying" (
"qualifyId" INT,
"position" INT,
PRIMARY KEY ("qualifyId")
);

CREATE TABLE "results" (
"resultId" INT,
"number" INT,
PRIMARY KEY ("resultId")
);



INSERT INTO "drivers" VALUES ("1", "VER", "1997-07-30", "Dutch");
INSERT INTO "drivers" VALUES ("2", "LEC", "1997-10-03", "Monegasque");
INSERT INTO "drivers" VALUES ("3", "RUS", "1999-09-02", "Russian");
INSERT INTO "drivers" VALUES ("4", "SAI", "1999-02-21", "Spanish");
INSERT INTO "drivers" VALUES ("5", "TSU", "1998-08-11", "Japanese");
INSERT INTO "drivers" VALUES ("6", "ZHO", "1999-05-30", "Chinese");
INSERT INTO "drivers" VALUES ("7", "OCO", "1996-02-17", "French");
INSERT INTO "drivers" VALUES ("8", "BOT", "1989-01-06", "British");
INSERT INTO "drivers" VALUES ("9", "GAS", "1996-09-04", "French");
INSERT INTO "drivers" VALUES ("10", "HUL", "1989-11-11", "German");
INSERT INTO "driverStandings" VALUES ("1", "10");
INSERT INTO "driverStandings" VALUES ("2", "5");
INSERT INTO "driverStandings" VALUES ("3", "3");
INSERT INTO "driverStandings" VALUES ("4", "2");
INSERT INTO "driverStandings" VALUES ("5", "1");
INSERT INTO "driverStandings" VALUES ("6", "0");
INSERT INTO "driverStandings" VALUES ("7", "0");
INSERT INTO "driverStandings" VALUES ("8", "0");
INSERT INTO "driverStandings" VALUES ("9", "0");
INSERT INTO "driverStandings" VALUES ("10", "0");