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 "airlines" (
"uid" INT,
"Country" TEXT,
PRIMARY KEY ("uid")
);

CREATE TABLE "airports" (
"AirportCode" TEXT,
"Country" TEXT,
"CountryAbbrev" TEXT,
PRIMARY KEY ("AirportCode")
);

CREATE TABLE "flights" (
"Airline" INT,
"FlightNo" INT,
PRIMARY KEY ("Airline", "FlightNo")
);





INSERT INTO "airlines" VALUES ("1", "USA");
INSERT INTO "airlines" VALUES ("2", "USA");
INSERT INTO "airlines" VALUES ("3", "Canada");
INSERT INTO "airlines" VALUES ("4", "USA");
INSERT INTO "airlines" VALUES ("5", "Mexico");
INSERT INTO "airlines" VALUES ("6", "USA");
INSERT INTO "airlines" VALUES ("7", "France");
INSERT INTO "airlines" VALUES ("8", "USA");
INSERT INTO "airlines" VALUES ("9", "Brazil");
INSERT INTO "airlines" VALUES ("10", "USA");
INSERT INTO "airports" VALUES ("JFK", "USA", "NY");
INSERT INTO "airports" VALUES ("LAX", "USA", "CA");
INSERT INTO "airports" VALUES ("ORD", "USA", "IL");
INSERT INTO "airports" VALUES ("YYZ", "Canada", "ON");
INSERT INTO "airports" VALUES ("MEX", "Mexico", "MX");
INSERT INTO "airports" VALUES ("CDG", "France", "IDF");
INSERT INTO "airports" VALUES ("GRU", "Brazil", "SP");
INSERT INTO "airports" VALUES ("SFO", "USA", "CA");
INSERT INTO "airports" VALUES ("ATL", "USA", "GA");
INSERT INTO "airports" VALUES ("SEA", "USA", "WA");
INSERT INTO "flights" VALUES ("1", "100");
INSERT INTO "flights" VALUES ("1", "101");
INSERT INTO "flights" VALUES ("2", "200");
INSERT INTO "flights" VALUES ("3", "300");
INSERT INTO "flights" VALUES ("4", "400");
INSERT INTO "flights" VALUES ("4", "401");
INSERT INTO "flights" VALUES ("5", "500");
INSERT INTO "flights" VALUES ("6", "600");
INSERT INTO "flights" VALUES ("7", "700");
INSERT INTO "flights" VALUES ("8", "800");
INSERT INTO "flights" VALUES ("9", "900");
INSERT INTO "flights" VALUES ("10", "1000");
INSERT INTO "flights" VALUES ("10", "1001");