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

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

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





INSERT INTO "airlines" VALUES ("1", "United Airlines", "UAL");
INSERT INTO "airlines" VALUES ("2", "Delta Air Lines", "DAL");
INSERT INTO "airlines" VALUES ("3", "American Airlines", "AAL");
INSERT INTO "airlines" VALUES ("4", "Southwest Airlines", "SWA");
INSERT INTO "airlines" VALUES ("5", "Alaska Airlines", "ALK");
INSERT INTO "airlines" VALUES ("6", "JetBlue Airways", "JBU");
INSERT INTO "airlines" VALUES ("7", "Spirit Airlines", "SPR");
INSERT INTO "airlines" VALUES ("8", "Frontier Airlines", "NULL");
INSERT INTO "airlines" VALUES ("9", "Allegiant Air", "AL");
INSERT INTO "airlines" VALUES ("10", "Hawaiian Airlines", "HA");
INSERT INTO "airlines" VALUES ("11", "Fake Airline", "UAL");
INSERT INTO "airlines" VALUES ("12", "No Abbreviation Airline", "");
INSERT INTO "airlines" VALUES ("13", "Edge Case Airline", "U A L");
INSERT INTO "airports" VALUES ("JFK", "USA");
INSERT INTO "airports" VALUES ("LAX", "USA");
INSERT INTO "airports" VALUES ("ATL", "USA");
INSERT INTO "airports" VALUES ("ORD", "USA");
INSERT INTO "airports" VALUES ("DFW", "USA");
INSERT INTO "airports" VALUES ("DEN", "USA");
INSERT INTO "airports" VALUES ("SFO", "USA");
INSERT INTO "airports" VALUES ("SEA", "USA");
INSERT INTO "airports" VALUES ("MIA", "USA");
INSERT INTO "airports" VALUES ("BOS", "USA");
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 ("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 ("11", "1100");
INSERT INTO "flights" VALUES ("12", "1200");
INSERT INTO "flights" VALUES ("13", "1300");