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", "Albert Park Grand Prix Circuit", "Melbourne", "Australia");
INSERT INTO "circuits" VALUES ("2", "Silverstone Circuit", "Silverstone", "United Kingdom");
INSERT INTO "circuits" VALUES ("3", "Monza Circuit", "Monza", "Italy");
INSERT INTO "circuits" VALUES ("4", "Spa-Francorchamps", "Stavelot", "Belgium");
INSERT INTO "circuits" VALUES ("5", "Suzuka Circuit", "Suzuka", "Japan");
INSERT INTO "races" VALUES ("101", "1998", "1", "Australian Grand Prix", "1998-03-08");
INSERT INTO "races" VALUES ("102", "1998", "2", "Brazilian Grand Prix", "1998-03-29");
INSERT INTO "races" VALUES ("103", "1998", "3", "San Marino Grand Prix", "1998-04-26");
INSERT INTO "races" VALUES ("104", "1998", "4", "Spanish Grand Prix", "1998-05-10");
INSERT INTO "races" VALUES ("105", "1998", "5", "Monaco Grand Prix", "1998-05-24");
INSERT INTO "races" VALUES ("201", "1999", "1", "Australian Grand Prix", "1999-03-07");
INSERT INTO "races" VALUES ("202", "1999", "2", "Brazilian Grand Prix", "1999-03-28");
INSERT INTO "races" VALUES ("203", "1999", "3", "San Marino Grand Prix", "1999-04-25");
INSERT INTO "races" VALUES ("204", "1999", "4", "Spanish Grand Prix", "1999-05-09");
INSERT INTO "races" VALUES ("205", "1999", "5", "Monaco Grand Prix", "1999-05-23");
INSERT INTO "races" VALUES ("206", "1999", "6", "Canadian Grand Prix", "1999-06-13");
INSERT INTO "races" VALUES ("207", "1999", "7", "French Grand Prix", "1999-06-27");
INSERT INTO "races" VALUES ("208", "1999", "8", "British Grand Prix", "1999-07-11");
INSERT INTO "races" VALUES ("209", "1999", "9", "German Grand Prix", "1999-07-25");
INSERT INTO "races" VALUES ("210", "1999", "10", "Hungarian Grand Prix", "1999-08-15");
INSERT INTO "races" VALUES ("211", "1999", "11", "Belgian Grand Prix", "1999-08-29");
INSERT INTO "races" VALUES ("212", "1999", "12", "Italian Grand Prix", "1999-09-12");
INSERT INTO "races" VALUES ("213", "1999", "13", "European Grand Prix", "1999-09-26");
INSERT INTO "races" VALUES ("214", "1999", "14", "Malaysian Grand Prix", "1999-10-03");
INSERT INTO "races" VALUES ("215", "1999", "15", "Japanese Grand Prix", "1999-10-17");
INSERT INTO "races" VALUES ("216", "1999", "16", "Pacific Grand Prix", "1999-10-24");
INSERT INTO "races" VALUES ("217", "1999", "17", "Japanese Grand Prix", "1999-10-31");
INSERT INTO "races" VALUES ("218", "1999", "18", "Malaysian Grand Prix", "1999-11-07");
INSERT INTO "races" VALUES ("301", "2000", "1", "Australian Grand Prix", "2000-03-12");
INSERT INTO "races" VALUES ("302", "2000", "2", "Brazilian Grand Prix", "2000-03-26");
INSERT INTO "races" VALUES ("303", "2000", "3", "San Marino Grand Prix", "2000-04-09");
INSERT INTO "races" VALUES ("304", "2000", "4", "Spanish Grand Prix", "2000-04-23");
INSERT INTO "races" VALUES ("305", "2000", "5", "Monaco Grand Prix", "2000-05-14");
INSERT INTO "races" VALUES ("306", "2000", "6", "Canadian Grand Prix", "2000-06-04");
INSERT INTO "races" VALUES ("307", "2000", "7", "French Grand Prix", "2000-06-18");
INSERT INTO "races" VALUES ("308", "2000", "8", "British Grand Prix", "2000-07-09");
INSERT INTO "races" VALUES ("309", "2000", "9", "German Grand Prix", "2000-07-23");
INSERT INTO "races" VALUES ("310", "2000", "10", "Hungarian Grand Prix", "2000-08-13");
INSERT INTO "races" VALUES ("311", "2000", "11", "Belgian Grand Prix", "2000-08-27");
INSERT INTO "races" VALUES ("312", "2000", "12", "Italian Grand Prix", "2000-09-10");
INSERT INTO "races" VALUES ("313", "2000", "13", "European Grand Prix", "2000-09-24");
INSERT INTO "races" VALUES ("314", "2000", "14", "Malaysian Grand Prix", "2000-10-01");
INSERT INTO "races" VALUES ("315", "2000", "15", "Japanese Grand Prix", "2000-10-08");
INSERT INTO "races" VALUES ("316", "2000", "16", "Brazilian Grand Prix", "2000-10-22");