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,
"points" FLOAT,
PRIMARY KEY ("driverStandingsId")
);

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

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

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



INSERT INTO "driverStandings" VALUES ("1", "150.5");
INSERT INTO "driverStandings" VALUES ("2", "120.0");
INSERT INTO "driverStandings" VALUES ("3", "98.0");
INSERT INTO "driverStandings" VALUES ("4", "75.5");
INSERT INTO "driverStandings" VALUES ("5", "60.0");
INSERT INTO "drivers" VALUES ("1", "schumacher", "1969-01-03", "German");
INSERT INTO "drivers" VALUES ("2", "vettel", "1987-07-03", "German");
INSERT INTO "drivers" VALUES ("3", "hamilton", "1985-01-07", "British");
INSERT INTO "drivers" VALUES ("4", "alonso", "1981-07-29", "Spanish");
INSERT INTO "drivers" VALUES ("5", "rosberg", "1985-04-27", "German");
INSERT INTO "drivers" VALUES ("6", "hulkenberg", "1987-08-11", "German");
INSERT INTO "drivers" VALUES ("7", "verstappen", "1997-09-30", "Dutch");
INSERT INTO "qualifying" VALUES ("1", "1");
INSERT INTO "qualifying" VALUES ("2", "2");
INSERT INTO "qualifying" VALUES ("3", "3");
INSERT INTO "qualifying" VALUES ("4", "4");
INSERT INTO "qualifying" VALUES ("5", "5");
INSERT INTO "results" VALUES ("1", "1");
INSERT INTO "results" VALUES ("2", "2");
INSERT INTO "results" VALUES ("3", "3");
INSERT INTO "results" VALUES ("4", "4");
INSERT INTO "results" VALUES ("5", "5");