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

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

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", "95.0");
INSERT INTO "driverStandings" VALUES ("4", "80.0");
INSERT INTO "driverStandings" VALUES ("5", "60.0");
INSERT INTO "constructors" VALUES ("1", "German");
INSERT INTO "constructors" VALUES ("2", "British");
INSERT INTO "constructors" VALUES ("3", "Italian");
INSERT INTO "constructors" VALUES ("4", "French");
INSERT INTO "drivers" VALUES ("1", "Michael", "Schumacher", "1969-01-03", "German", "https://en.wikipedia.org/wiki/Michael_Schumacher");
INSERT INTO "drivers" VALUES ("2", "Sebastian", "Vettel", "1987-07-03", "German", "https://en.wikipedia.org/wiki/Sebastian_Vettel");
INSERT INTO "drivers" VALUES ("3", "Nico", "Rosberg", "1985-06-27", "German", "https://en.wikipedia.org/wiki/Nico_Rosberg");
INSERT INTO "drivers" VALUES ("4", "Ralf", "Schumacher", "1975-06-30", "German", "https://en.wikipedia.org/wiki/Ralf_Schumacher");
INSERT INTO "drivers" VALUES ("5", "Timo", "Glock", "1982-03-18", "German", "https://en.wikipedia.org/wiki/Timo_Glock");
INSERT INTO "drivers" VALUES ("6", "Lewis", "Hamilton", "1985-01-07", "British", "https://en.wikipedia.org/wiki/Lewis_Hamilton");
INSERT INTO "drivers" VALUES ("7", "Kimi", "Räikkönen", "1979-10-17", "Finnish", "https://en.wikipedia.org/wiki/Kimi_Räikkönen");
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");