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,
"driverId" INT,
PRIMARY KEY ("driverStandingsId"),
FOREIGN KEY ("driverId") REFERENCES "drivers"("driverId")
);

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



INSERT INTO "drivers" VALUES ("1", "hamilton", "Lewis", "Hamilton", "British", "https://en.wikipedia.org/wiki/Lewis_Hamilton");
INSERT INTO "drivers" VALUES ("2", "vettel", "Sebastian", "Vettel", "German", "https://en.wikipedia.org/wiki/Sebastian_Vettel");
INSERT INTO "drivers" VALUES ("3", "alonso", "Fernando", "Alonso", "Spanish", "https://en.wikipedia.org/wiki/Fernando_Alonso");
INSERT INTO "drivers" VALUES ("4", "Davidson", "Anthony", "Davidson", "British", "https://en.wikipedia.org/wiki/Anthony_Davidson");
INSERT INTO "drivers" VALUES ("5", "massa", "Felipe", "Massa", "Brazilian", "https://en.wikipedia.org/wiki/Felipe_Massa");
INSERT INTO "driverStandings" VALUES ("101", "1");
INSERT INTO "driverStandings" VALUES ("102", "2");
INSERT INTO "driverStandings" VALUES ("103", "3");
INSERT INTO "driverStandings" VALUES ("104", "4");
INSERT INTO "driverStandings" VALUES ("105", "5");