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 "circuits" (
"circuitId" INT,
"name" TEXT,
"location" TEXT,
"country" TEXT,
PRIMARY KEY ("circuitId")
);

CREATE TABLE "races" (
"raceId" INT,
"year" INT,
"round" INT,
"name" TEXT,
"date" DATE,
PRIMARY KEY ("raceId")
);



INSERT INTO "circuits" VALUES ("1", "Silverstone Circuit", "Silverstone", "United Kingdom");
INSERT INTO "circuits" VALUES ("2", "Monza Circuit", "Monza", "Italy");
INSERT INTO "circuits" VALUES ("3", "Suzuka Circuit", "Suzuka", "Japan");
INSERT INTO "circuits" VALUES ("4", "Spa-Francorchamps", "Stavelot", "Belgium");
INSERT INTO "circuits" VALUES ("5", "Interlagos", "São Paulo", "Brazil");
INSERT INTO "races" VALUES ("101", "1999", "1", "Australian Grand Prix", "1999-03-07");
INSERT INTO "races" VALUES ("102", "1999", "2", "Brazilian Grand Prix", "1999-03-21");
INSERT INTO "races" VALUES ("103", "1999", "3", "San Marino Grand Prix", "1999-04-04");
INSERT INTO "races" VALUES ("104", "1999", "4", "Spanish Grand Prix", "1999-05-02");
INSERT INTO "races" VALUES ("105", "1999", "5", "Monaco Grand Prix", "1999-05-16");
INSERT INTO "races" VALUES ("106", "1999", "6", "Canadian Grand Prix", "1999-06-13");
INSERT INTO "races" VALUES ("107", "1999", "7", "French Grand Prix", "1999-06-27");
INSERT INTO "races" VALUES ("108", "1999", "8", "British Grand Prix", "1999-07-11");
INSERT INTO "races" VALUES ("109", "1999", "9", "German Grand Prix", "1999-07-25");
INSERT INTO "races" VALUES ("110", "1999", "10", "Hungarian Grand Prix", "1999-08-15");
INSERT INTO "races" VALUES ("111", "1999", "11", "Belgian Grand Prix", "1999-08-29");
INSERT INTO "races" VALUES ("112", "1999", "12", "Italian Grand Prix", "1999-09-12");
INSERT INTO "races" VALUES ("113", "1999", "13", "European Grand Prix", "1999-09-26");
INSERT INTO "races" VALUES ("114", "1999", "14", "Malaysian Grand Prix", "1999-10-17");
INSERT INTO "races" VALUES ("115", "1999", "15", "Japanese Grand Prix", "1999-10-31");
INSERT INTO "races" VALUES ("116", "1999", "16", "Pacific Grand Prix", "1999-04-18");
INSERT INTO "races" VALUES ("117", "1999", "17", "Final Grand Prix", "1999-11-14");