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

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

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





INSERT INTO "airlines" VALUES ("1", "American Airlines", "AA", "USA");
INSERT INTO "airlines" VALUES ("2", "Delta Air Lines", "DL", "USA");
INSERT INTO "airlines" VALUES ("3", "United Airlines", "UA", "USA");
INSERT INTO "airlines" VALUES ("4", "Southwest Airlines", "WN", "USA");
INSERT INTO "airlines" VALUES ("5", "Air Canada", "AC", "Canada");
INSERT INTO "airlines" VALUES ("6", "British Airways", "BA", "UK");
INSERT INTO "airlines" VALUES ("7", "Lufthansa", "LH", "Germany");
INSERT INTO "airlines" VALUES ("8", "Emirates", "EK", "UAE");
INSERT INTO "airlines" VALUES ("9", "JetBlue Airways", "B6", "USA");
INSERT INTO "airlines" VALUES ("10", "Alaska Airlines", "AS", "USA");
INSERT INTO "airports" VALUES ("New York", "JFK", "USA");
INSERT INTO "airports" VALUES ("Los Angeles", "LAX", "USA");
INSERT INTO "airports" VALUES ("Chicago", "ORD", "USA");
INSERT INTO "airports" VALUES ("Toronto", "YYZ", "Canada");
INSERT INTO "airports" VALUES ("London", "LHR", "UK");
INSERT INTO "airports" VALUES ("Frankfurt", "FRA", "Germany");
INSERT INTO "airports" VALUES ("Dubai", "DXB", "UAE");
INSERT INTO "airports" VALUES ("Miami", "MIA", "USA");
INSERT INTO "airports" VALUES ("Seattle", "SEA", "USA");
INSERT INTO "airports" VALUES ("Boston", "BOS", "USA");
INSERT INTO "flights" VALUES ("1", "100");
INSERT INTO "flights" VALUES ("1", "101");
INSERT INTO "flights" VALUES ("2", "200");
INSERT INTO "flights" VALUES ("2", "201");
INSERT INTO "flights" VALUES ("3", "300");
INSERT INTO "flights" VALUES ("3", "301");
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");