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

CREATE TABLE "races" (
"raceId" INT,
"year" INT,
"circuitId" INT,
"name" TEXT,
"date" DATE,
PRIMARY KEY ("raceId"),
FOREIGN KEY ("circuitId") REFERENCES "circuits"("circuitId")
);



INSERT INTO "circuits" VALUES ("1", "Circuit de Monaco", "Monaco");
INSERT INTO "circuits" VALUES ("2", "Silverstone Circuit", "UK");
INSERT INTO "circuits" VALUES ("3", "Autodromo Nazionale Monza", "Italy");
INSERT INTO "circuits" VALUES ("4", "Circuit de Spa-Francorchamps", "Belgium");
INSERT INTO "circuits" VALUES ("5", "Suzuka Circuit", "Japan");
INSERT INTO "circuits" VALUES ("6", "Hockenheimring", "Germany");
INSERT INTO "circuits" VALUES ("7", "Hungaroring", "Hungary");
INSERT INTO "circuits" VALUES ("8", "Circuit Gilles Villeneuve", "Canada");
INSERT INTO "circuits" VALUES ("9", "Interlagos", "Brazil");
INSERT INTO "circuits" VALUES ("10", "Adelaide Street Circuit", "Australia");
INSERT INTO "circuits" VALUES ("11", "Kyalami", "South Africa");
INSERT INTO "circuits" VALUES ("12", "Estoril", "Portugal");
INSERT INTO "circuits" VALUES ("13", "Jerez", "Spain");
INSERT INTO "circuits" VALUES ("14", "Magny-Cours", "France");
INSERT INTO "circuits" VALUES ("15", "Nürburgring", "Germany");
INSERT INTO "races" VALUES ("1", "1990", "1", "Monaco Grand Prix", "1990-05-27");
INSERT INTO "races" VALUES ("2", "1990", "2", "British Grand Prix", "1990-07-15");
INSERT INTO "races" VALUES ("3", "1990", "3", "Italian Grand Prix", "1990-09-09");
INSERT INTO "races" VALUES ("4", "1990", "4", "Belgian Grand Prix", "1990-08-26");
INSERT INTO "races" VALUES ("5", "1990", "5", "Japanese Grand Prix", "1990-10-21");
INSERT INTO "races" VALUES ("6", "1991", "1", "Monaco Grand Prix", "1991-05-12");
INSERT INTO "races" VALUES ("7", "1991", "2", "British Grand Prix", "1991-07-14");
INSERT INTO "races" VALUES ("8", "1991", "3", "Italian Grand Prix", "1991-09-08");
INSERT INTO "races" VALUES ("9", "1991", "4", "Belgian Grand Prix", "1991-08-25");
INSERT INTO "races" VALUES ("10", "1991", "5", "Japanese Grand Prix", "1991-10-20");
INSERT INTO "races" VALUES ("11", "1992", "1", "Monaco Grand Prix", "1992-05-31");
INSERT INTO "races" VALUES ("12", "1992", "2", "British Grand Prix", "1992-07-12");
INSERT INTO "races" VALUES ("13", "1992", "3", "Italian Grand Prix", "1992-09-13");
INSERT INTO "races" VALUES ("14", "1992", "4", "Belgian Grand Prix", "1992-08-30");
INSERT INTO "races" VALUES ("15", "1992", "5", "Japanese Grand Prix", "1992-10-25");
INSERT INTO "races" VALUES ("16", "1993", "1", "Monaco Grand Prix", "1993-05-23");
INSERT INTO "races" VALUES ("17", "1993", "2", "British Grand Prix", "1993-07-11");
INSERT INTO "races" VALUES ("18", "1993", "3", "Italian Grand Prix", "1993-09-12");
INSERT INTO "races" VALUES ("19", "1993", "4", "Belgian Grand Prix", "1993-08-29");
INSERT INTO "races" VALUES ("20", "1993", "5", "Japanese Grand Prix", "1993-10-24");
INSERT INTO "races" VALUES ("21", "1994", "1", "Monaco Grand Prix", "1994-05-15");
INSERT INTO "races" VALUES ("22", "1994", "2", "British Grand Prix", "1994-07-10");
INSERT INTO "races" VALUES ("23", "1994", "3", "Italian Grand Prix", "1994-09-11");
INSERT INTO "races" VALUES ("24", "1994", "4", "Belgian Grand Prix", "1994-08-28");
INSERT INTO "races" VALUES ("25", "1994", "5", "Japanese Grand Prix", "1994-10-09");
INSERT INTO "races" VALUES ("26", "1995", "1", "Monaco Grand Prix", "1995-05-28");
INSERT INTO "races" VALUES ("27", "1995", "2", "British Grand Prix", "1995-07-16");
INSERT INTO "races" VALUES ("28", "1995", "3", "Italian Grand Prix", "1995-09-10");
INSERT INTO "races" VALUES ("29", "1995", "4", "Belgian Grand Prix", "1995-08-27");
INSERT INTO "races" VALUES ("30", "1995", "5", "Japanese Grand Prix", "1995-10-29");
INSERT INTO "races" VALUES ("31", "1996", "1", "Monaco Grand Prix", "1996-05-19");
INSERT INTO "races" VALUES ("32", "1996", "2", "British Grand Prix", "1996-07-14");
INSERT INTO "races" VALUES ("33", "1996", "3", "Italian Grand Prix", "1996-09-08");
INSERT INTO "races" VALUES ("34", "1996", "4", "Belgian Grand Prix", "1996-08-25");
INSERT INTO "races" VALUES ("35", "1996", "5", "Japanese Grand Prix", "1996-10-13");
INSERT INTO "races" VALUES ("36", "1997", "1", "Monaco Grand Prix", "1997-05-11");
INSERT INTO "races" VALUES ("37", "1997", "2", "British Grand Prix", "1997-07-13");
INSERT INTO "races" VALUES ("38", "1997", "3", "Italian Grand Prix", "1997-09-07");
INSERT INTO "races" VALUES ("39", "1997", "4", "Belgian Grand Prix", "1997-08-24");
INSERT INTO "races" VALUES ("40", "1997", "5", "Japanese Grand Prix", "1997-10-12");
INSERT INTO "races" VALUES ("41", "1998", "1", "Monaco Grand Prix", "1998-05-24");
INSERT INTO "races" VALUES ("42", "1998", "2", "British Grand Prix", "1998-07-12");
INSERT INTO "races" VALUES ("43", "1998", "3", "Italian Grand Prix", "1998-09-13");
INSERT INTO "races" VALUES ("44", "1998", "4", "Belgian Grand Prix", "1998-08-30");
INSERT INTO "races" VALUES ("45", "1998", "5", "Japanese Grand Prix", "1998-11-01");
INSERT INTO "races" VALUES ("46", "1999", "1", "Monaco Grand Prix", "1999-05-16");
INSERT INTO "races" VALUES ("47", "1999", "2", "British Grand Prix", "1999-07-11");
INSERT INTO "races" VALUES ("48", "1999", "3", "Italian Grand Prix", "1999-09-12");
INSERT INTO "races" VALUES ("49", "1999", "4", "Belgian Grand Prix", "1999-08-29");
INSERT INTO "races" VALUES ("50", "1999", "5", "Japanese Grand Prix", "1999-10-31");
INSERT INTO "races" VALUES ("51", "2000", "1", "Monaco Grand Prix", "2000-06-04");
INSERT INTO "races" VALUES ("52", "2000", "2", "British Grand Prix", "2000-04-23");
INSERT INTO "races" VALUES ("53", "2000", "3", "Italian Grand Prix", "2000-09-10");
INSERT INTO "races" VALUES ("54", "2000", "4", "Belgian Grand Prix", "2000-08-27");
INSERT INTO "races" VALUES ("55", "2000", "5", "Japanese Grand Prix", "2000-10-08");
INSERT INTO "races" VALUES ("56", "1990", "6", "German Grand Prix", "1990-07-29");
INSERT INTO "races" VALUES ("57", "1991", "6", "German Grand Prix", "1991-07-28");
INSERT INTO "races" VALUES ("58", "1992", "6", "German Grand Prix", "1992-07-26");
INSERT INTO "races" VALUES ("59", "1993", "6", "German Grand Prix", "1993-07-25");
INSERT INTO "races" VALUES ("60", "1994", "6", "German Grand Prix", "1994-07-31");
INSERT INTO "races" VALUES ("61", "1995", "6", "German Grand Prix", "1995-07-30");
INSERT INTO "races" VALUES ("62", "1996", "6", "German Grand Prix", "1996-07-28");
INSERT INTO "races" VALUES ("63", "1997", "6", "German Grand Prix", "1997-07-27");
INSERT INTO "races" VALUES ("64", "1998", "6", "German Grand Prix", "1998-08-02");
INSERT INTO "races" VALUES ("65", "1999", "6", "German Grand Prix", "1999-08-01");
INSERT INTO "races" VALUES ("66", "2000", "6", "German Grand Prix", "2000-07-30");
INSERT INTO "races" VALUES ("67", "1990", "7", "Hungarian Grand Prix", "1990-08-12");
INSERT INTO "races" VALUES ("68", "1991", "7", "Hungarian Grand Prix", "1991-08-11");
INSERT INTO "races" VALUES ("69", "1992", "7", "Hungarian Grand Prix", "1992-08-16");
INSERT INTO "races" VALUES ("70", "1993", "7", "Hungarian Grand Prix", "1993-08-15");
INSERT INTO "races" VALUES ("71", "1994", "7", "Hungarian Grand Prix", "1994-08-14");
INSERT INTO "races" VALUES ("72", "1995", "7", "Hungarian Grand Prix", "1995-08-13");
INSERT INTO "races" VALUES ("73", "1996", "7", "Hungarian Grand Prix", "1996-08-11");
INSERT INTO "races" VALUES ("74", "1997", "7", "Hungarian Grand Prix", "1997-08-10");
INSERT INTO "races" VALUES ("75", "1998", "7", "Hungarian Grand Prix", "1998-08-16");
INSERT INTO "races" VALUES ("76", "1999", "7", "Hungarian Grand Prix", "1999-08-15");
INSERT INTO "races" VALUES ("77", "2000", "7", "Hungarian Grand Prix", "2000-08-13");
INSERT INTO "races" VALUES ("78", "1990", "8", "Canadian Grand Prix", "1990-06-10");
INSERT INTO "races" VALUES ("79", "1991", "8", "Canadian Grand Prix", "1991-06-02");
INSERT INTO "races" VALUES ("80", "1992", "8", "Canadian Grand Prix", "1992-06-14");
INSERT INTO "races" VALUES ("81", "1993", "8", "Canadian Grand Prix", "1993-06-13");
INSERT INTO "races" VALUES ("82", "1994", "8", "Canadian Grand Prix", "1994-06-12");
INSERT INTO "races" VALUES ("83", "1995", "8", "Canadian Grand Prix", "1995-06-11");
INSERT INTO "races" VALUES ("84", "1996", "8", "Canadian Grand Prix", "1996-06-16");
INSERT INTO "races" VALUES ("85", "1997", "8", "Canadian Grand Prix", "1997-06-15");
INSERT INTO "races" VALUES ("86", "1998", "8", "Canadian Grand Prix", "1998-06-07");
INSERT INTO "races" VALUES ("87", "1999", "8", "Canadian Grand Prix", "1999-06-13");
INSERT INTO "races" VALUES ("88", "2000", "8", "Canadian Grand Prix", "2000-06-18");
INSERT INTO "races" VALUES ("89", "1990", "9", "Brazilian Grand Prix", "1990-03-25");
INSERT INTO "races" VALUES ("90", "1991", "9", "Brazilian Grand Prix", "1991-03-24");
INSERT INTO "races" VALUES ("91", "1992", "9", "Brazilian Grand Prix", "1992-04-05");
INSERT INTO "races" VALUES ("92", "1993", "9", "Brazilian Grand Prix", "1993-03-28");
INSERT INTO "races" VALUES ("93", "1994", "9", "Brazilian Grand Prix", "1994-03-27");
INSERT INTO "races" VALUES ("94", "1995", "9", "Brazilian Grand Prix", "1995-03-26");
INSERT INTO "races" VALUES ("95", "1996", "9", "Brazilian Grand Prix", "1996-03-31");
INSERT INTO "races" VALUES ("96", "1997", "9", "Brazilian Grand Prix", "1997-03-30");
INSERT INTO "races" VALUES ("97", "1998", "9", "Brazilian Grand Prix", "1998-03-29");
INSERT INTO "races" VALUES ("98", "1999", "9", "Brazilian Grand Prix", "1999-04-11");
INSERT INTO "races" VALUES ("99", "2000", "9", "Brazilian Grand Prix", "2000-03-26");
INSERT INTO "races" VALUES ("100", "1990", "10", "Australian Grand Prix", "1990-11-04");
INSERT INTO "races" VALUES ("101", "1991", "10", "Australian Grand Prix", "1991-11-03");
INSERT INTO "races" VALUES ("102", "1992", "10", "Australian Grand Prix", "1992-11-08");
INSERT INTO "races" VALUES ("103", "1993", "10", "Australian Grand Prix", "1993-11-07");
INSERT INTO "races" VALUES ("104", "1994", "10", "Australian Grand Prix", "1994-11-13");
INSERT INTO "races" VALUES ("105", "1995", "10", "Australian Grand Prix", "1995-11-12");
INSERT INTO "races" VALUES ("106", "1996", "10", "Australian Grand Prix", "1996-03-10");
INSERT INTO "races" VALUES ("107", "1997", "10", "Australian Grand Prix", "1997-03-09");
INSERT INTO "races" VALUES ("108", "1998", "10", "Australian Grand Prix", "1998-03-08");
INSERT INTO "races" VALUES ("109", "1999", "10", "Australian Grand Prix", "1999-03-07");
INSERT INTO "races" VALUES ("110", "2000", "10", "Australian Grand Prix", "2000-03-12");
INSERT INTO "races" VALUES ("111", "1992", "11", "South African Grand Prix", "1992-03-01");
INSERT INTO "races" VALUES ("112", "1993", "11", "South African Grand Prix", "1993-03-14");
INSERT INTO "races" VALUES ("113", "1990", "12", "Portuguese Grand Prix", "1990-09-23");
INSERT INTO "races" VALUES ("114", "1991", "12", "Portuguese Grand Prix", "1991-09-22");
INSERT INTO "races" VALUES ("115", "1992", "12", "Portuguese Grand Prix", "1992-09-27");
INSERT INTO "races" VALUES ("116", "1993", "12", "Portuguese Grand Prix", "1993-09-26");
INSERT INTO "races" VALUES ("117", "1994", "12", "Portuguese Grand Prix", "1994-09-25");
INSERT INTO "races" VALUES ("118", "1995", "12", "Portuguese Grand Prix", "1995-09-24");
INSERT INTO "races" VALUES ("119", "1996", "12", "Portuguese Grand Prix", "1996-09-22");
INSERT INTO "races" VALUES ("120", "1997", "12", "Portuguese Grand Prix", "1997-09-28");
INSERT INTO "races" VALUES ("121", "1990", "13", "Spanish Grand Prix", "1990-09-30");
INSERT INTO "races" VALUES ("122", "1991", "13", "Spanish Grand Prix", "1991-09-29");
INSERT INTO "races" VALUES ("123", "1992", "13", "Spanish Grand Prix", "1992-05-03");
INSERT INTO "races" VALUES ("124", "1993", "13", "Spanish Grand Prix", "1993-05-09");
INSERT INTO "races" VALUES ("125", "1994", "13", "Spanish Grand Prix", "1994-05-29");
INSERT INTO "races" VALUES ("126", "1995", "13", "Spanish Grand Prix", "1995-05-14");
INSERT INTO "races" VALUES ("127", "1996", "13", "Spanish Grand Prix", "1996-06-02");
INSERT INTO "races" VALUES ("128", "1997", "13", "Spanish Grand Prix", "1997-05-25");
INSERT INTO "races" VALUES ("129", "1998", "13", "Spanish Grand Prix", "1998-05-10");
INSERT INTO "races" VALUES ("130", "1999", "13", "Spanish Grand Prix", "1999-05-30");
INSERT INTO "races" VALUES ("131", "2000", "13", "Spanish Grand Prix", "2000-05-07");
INSERT INTO "races" VALUES ("132", "1991", "14", "French Grand Prix", "1991-07-07");
INSERT INTO "races" VALUES ("133", "1992", "14", "French Grand Prix", "1992-07-05");
INSERT INTO "races" VALUES ("134", "1993", "14", "French Grand Prix", "1993-07-04");
INSERT INTO "races" VALUES ("135", "1994", "14", "French Grand Prix", "1994-07-03");
INSERT INTO "races" VALUES ("136", "1995", "14", "French Grand Prix", "1995-07-02");
INSERT INTO "races" VALUES ("137", "1996", "14", "French Grand Prix", "1996-06-30");
INSERT INTO "races" VALUES ("138", "1997", "14", "French Grand Prix", "1997-06-29");
INSERT INTO "races" VALUES ("139", "1998", "14", "French Grand Prix", "1998-06-28");
INSERT INTO "races" VALUES ("140", "1999", "14", "French Grand Prix", "1999-06-27");
INSERT INTO "races" VALUES ("141", "2000", "14", "French Grand Prix", "2000-07-02");
INSERT INTO "races" VALUES ("142", "1995", "15", "European Grand Prix", "1995-10-01");
INSERT INTO "races" VALUES ("143", "1996", "15", "European Grand Prix", "1996-04-28");
INSERT INTO "races" VALUES ("144", "1997", "15", "European Grand Prix", "1997-10-26");
INSERT INTO "races" VALUES ("145", "1999", "15", "European Grand Prix", "1999-09-26");
INSERT INTO "races" VALUES ("146", "2000", "15", "European Grand Prix", "2000-05-21");