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,
PRIMARY KEY ("driverId")
);

CREATE TABLE "results" (
"resultId" INT,
"grid" 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 "constructors" VALUES ("1", "Japanese");
INSERT INTO "constructors" VALUES ("2", "British");
INSERT INTO "constructors" VALUES ("3", "German");
INSERT INTO "drivers" VALUES ("1", "Takumi", "Sato", "1995-07-15", "Japanese");
INSERT INTO "drivers" VALUES ("2", "Hiroshi", "Tanaka", "1998-11-20", "Japanese");
INSERT INTO "drivers" VALUES ("3", "James", "Smith", "1992-03-10", "British");
INSERT INTO "drivers" VALUES ("4", "Lukas", "Müller", "1990-12-05", "German");
INSERT INTO "drivers" VALUES ("5", "Yuki", "Kobayashi", "1998-11-20", "Japanese");
INSERT INTO "results" VALUES ("1", "5");
INSERT INTO "results" VALUES ("2", "10");
INSERT INTO "results" VALUES ("3", "3");
INSERT INTO "results" VALUES ("4", "7");
INSERT INTO "results" VALUES ("5", "12");