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", "United States");
INSERT INTO "airlines" VALUES ("3", "USA");
INSERT INTO "airlines" VALUES ("4", "U.S.A.");
INSERT INTO "airlines" VALUES ("5", "Canada");
INSERT INTO "airlines" VALUES ("6", "Mexico");
INSERT INTO "airlines" VALUES ("7", "UK");
INSERT INTO "airlines" VALUES ("8", "United Kingdom");
INSERT INTO "airlines" VALUES ("9", "U.K.");
INSERT INTO "airlines" VALUES ("10", "France");
INSERT INTO "airlines" VALUES ("11", "Germany");
INSERT INTO "airlines" VALUES ("12", "NULL");
INSERT INTO "airlines" VALUES ("13", "");
INSERT INTO "airlines" VALUES ("14", "U S A");
INSERT INTO "airlines" VALUES ("15", "USA");
INSERT INTO "airlines" VALUES ("16", "U.S.");
INSERT INTO "airlines" VALUES ("17", "United States of America");
INSERT INTO "airlines" VALUES ("18", "USA");
INSERT INTO "airlines" VALUES ("19", "US");
INSERT INTO "airlines" VALUES ("20", "U.S");
INSERT INTO "airports" VALUES ("JFK", "USA", "US");
INSERT INTO "airports" VALUES ("LAX", "USA", "US");
INSERT INTO "airports" VALUES ("YYZ", "Canada", "CA");
INSERT INTO "airports" VALUES ("CDG", "France", "FR");
INSERT INTO "airports" VALUES ("LHR", "United Kingdom", "UK");
INSERT INTO "airports" VALUES ("MEX", "Mexico", "MX");
INSERT INTO "flights" VALUES ("1", "100");
INSERT INTO "flights" VALUES ("2", "101");
INSERT INTO "flights" VALUES ("3", "102");
INSERT INTO "flights" VALUES ("5", "200");
INSERT INTO "flights" VALUES ("6", "201");
INSERT INTO "flights" VALUES ("7", "300");
INSERT INTO "flights" VALUES ("8", "301");
INSERT INTO "flights" VALUES ("9", "302");
INSERT INTO "flights" VALUES ("10", "400");
INSERT INTO "flights" VALUES ("11", "401");
INSERT INTO "flights" VALUES ("14", "103");
INSERT INTO "flights" VALUES ("15", "104");
INSERT INTO "flights" VALUES ("16", "105");
INSERT INTO "flights" VALUES ("17", "106");
INSERT INTO "flights" VALUES ("18", "107");
INSERT INTO "flights" VALUES ("19", "108");
INSERT INTO "flights" VALUES ("20", "109");