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 "flights" (
"Airline" INT,
"FlightNo" INT,
"SourceAirport" TEXT,
"DestAirport" TEXT,
PRIMARY KEY ("Airline", "FlightNo")
);





INSERT INTO "airlines" VALUES ("1", "Southwest Airlines", "SWA");
INSERT INTO "airlines" VALUES ("2", "American Airlines", "AAL");
INSERT INTO "airlines" VALUES ("3", "Delta Air Lines", "DAL");
INSERT INTO "airlines" VALUES ("4", "United Airlines", "UAL");
INSERT INTO "airlines" VALUES ("5", "Alaska Airlines", "ASA");
INSERT INTO "airlines" VALUES ("6", "JetBlue Airways", "JBU");
INSERT INTO "airlines" VALUES ("7", "Spirit Airlines", "NKS");
INSERT INTO "airlines" VALUES ("8", "Frontier Airlines", "FFT");
INSERT INTO "airlines" VALUES ("9", "Allegiant Air", "AAY");
INSERT INTO "airlines" VALUES ("10", "Hawaiian Airlines", "HAL");
INSERT INTO "flights" VALUES ("1", "101", "LAX", "SFO");
INSERT INTO "flights" VALUES ("1", "102", "SFO", "LAX");
INSERT INTO "flights" VALUES ("1", "103", "LAX", "DEN");
INSERT INTO "flights" VALUES ("1", "104", "DEN", "LAX");
INSERT INTO "flights" VALUES ("1", "105", "SFO", "SEA");
INSERT INTO "flights" VALUES ("1", "106", "SEA", "SFO");
INSERT INTO "flights" VALUES ("1", "107", "DEN", "ORD");
INSERT INTO "flights" VALUES ("1", "108", "ORD", "DEN");
INSERT INTO "flights" VALUES ("1", "109", "LAX", "JFK");
INSERT INTO "flights" VALUES ("1", "110", "JFK", "LAX");
INSERT INTO "flights" VALUES ("2", "201", "DFW", "ORD");
INSERT INTO "flights" VALUES ("2", "202", "ORD", "DFW");
INSERT INTO "flights" VALUES ("2", "203", "DFW", "LAX");
INSERT INTO "flights" VALUES ("2", "204", "LAX", "DFW");
INSERT INTO "flights" VALUES ("2", "205", "ORD", "JFK");
INSERT INTO "flights" VALUES ("2", "206", "JFK", "ORD");
INSERT INTO "flights" VALUES ("2", "207", "DFW", "MIA");
INSERT INTO "flights" VALUES ("2", "208", "MIA", "DFW");
INSERT INTO "flights" VALUES ("2", "209", "LAX", "SEA");
INSERT INTO "flights" VALUES ("2", "210", "SEA", "LAX");
INSERT INTO "flights" VALUES ("3", "301", "ATL", "JFK");
INSERT INTO "flights" VALUES ("3", "302", "JFK", "ATL");
INSERT INTO "flights" VALUES ("3", "303", "ATL", "LAX");
INSERT INTO "flights" VALUES ("3", "304", "LAX", "ATL");
INSERT INTO "flights" VALUES ("3", "305", "JFK", "MIA");
INSERT INTO "flights" VALUES ("3", "306", "MIA", "JFK");
INSERT INTO "flights" VALUES ("3", "307", "ATL", "ORD");
INSERT INTO "flights" VALUES ("3", "308", "ORD", "ATL");
INSERT INTO "flights" VALUES ("3", "309", "LAX", "DEN");
INSERT INTO "flights" VALUES ("3", "310", "DEN", "LAX");
INSERT INTO "flights" VALUES ("4", "401", "ORD", "LAX");
INSERT INTO "flights" VALUES ("4", "402", "LAX", "ORD");
INSERT INTO "flights" VALUES ("4", "403", "ORD", "SFO");
INSERT INTO "flights" VALUES ("4", "404", "SFO", "ORD");
INSERT INTO "flights" VALUES ("4", "405", "LAX", "JFK");
INSERT INTO "flights" VALUES ("4", "406", "JFK", "LAX");
INSERT INTO "flights" VALUES ("4", "407", "SFO", "DEN");
INSERT INTO "flights" VALUES ("4", "408", "DEN", "SFO");
INSERT INTO "flights" VALUES ("4", "409", "ORD", "MIA");
INSERT INTO "flights" VALUES ("4", "410", "MIA", "ORD");
INSERT INTO "flights" VALUES ("5", "501", "SEA", "LAX");
INSERT INTO "flights" VALUES ("5", "502", "LAX", "SEA");
INSERT INTO "flights" VALUES ("5", "503", "SEA", "SFO");
INSERT INTO "flights" VALUES ("5", "504", "SFO", "SEA");
INSERT INTO "flights" VALUES ("5", "505", "LAX", "PDX");
INSERT INTO "flights" VALUES ("5", "506", "PDX", "LAX");
INSERT INTO "flights" VALUES ("6", "601", "JFK", "MIA");
INSERT INTO "flights" VALUES ("6", "602", "MIA", "JFK");
INSERT INTO "flights" VALUES ("6", "603", "JFK", "BOS");
INSERT INTO "flights" VALUES ("6", "604", "BOS", "JFK");
INSERT INTO "flights" VALUES ("7", "701", "FLL", "LGA");
INSERT INTO "flights" VALUES ("7", "702", "LGA", "FLL");
INSERT INTO "flights" VALUES ("8", "801", "DEN", "LAS");
INSERT INTO "flights" VALUES ("8", "802", "LAS", "DEN");
INSERT INTO "flights" VALUES ("9", "901", "LAS", "IND");
INSERT INTO "flights" VALUES ("9", "902", "IND", "LAS");
INSERT INTO "flights" VALUES ("10", "1001", "HNL", "LAX");
INSERT INTO "flights" VALUES ("10", "1002", "LAX", "HNL");