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", "100", "LAX", "SFO");
INSERT INTO "flights" VALUES ("1", "101", "SFO", "LAX");
INSERT INTO "flights" VALUES ("1", "102", "LAX", "DEN");
INSERT INTO "flights" VALUES ("1", "103", "DEN", "LAX");
INSERT INTO "flights" VALUES ("1", "104", "SFO", "SEA");
INSERT INTO "flights" VALUES ("1", "105", "SEA", "SFO");
INSERT INTO "flights" VALUES ("1", "106", "DEN", "ORD");
INSERT INTO "flights" VALUES ("1", "107", "ORD", "DEN");
INSERT INTO "flights" VALUES ("1", "108", "LAX", "JFK");
INSERT INTO "flights" VALUES ("1", "109", "JFK", "LAX");
INSERT INTO "flights" VALUES ("1", "110", "SFO", "JFK");
INSERT INTO "flights" VALUES ("2", "200", "DFW", "LAX");
INSERT INTO "flights" VALUES ("2", "201", "LAX", "DFW");
INSERT INTO "flights" VALUES ("2", "202", "DFW", "ORD");
INSERT INTO "flights" VALUES ("2", "203", "ORD", "DFW");
INSERT INTO "flights" VALUES ("2", "204", "LAX", "MIA");
INSERT INTO "flights" VALUES ("2", "205", "MIA", "LAX");
INSERT INTO "flights" VALUES ("3", "300", "ATL", "LAX");
INSERT INTO "flights" VALUES ("3", "301", "LAX", "ATL");
INSERT INTO "flights" VALUES ("3", "302", "ATL", "JFK");
INSERT INTO "flights" VALUES ("3", "303", "JFK", "ATL");
INSERT INTO "flights" VALUES ("4", "400", "ORD", "LAX");
INSERT INTO "flights" VALUES ("4", "401", "LAX", "ORD");
INSERT INTO "flights" VALUES ("5", "500", "SEA", "LAX");
INSERT INTO "flights" VALUES ("5", "501", "LAX", "SEA");
INSERT INTO "flights" VALUES ("6", "600", "JFK", "LAX");
INSERT INTO "flights" VALUES ("7", "700", "MIA", "LAX");
INSERT INTO "flights" VALUES ("8", "800", "DEN", "LAX");
INSERT INTO "flights" VALUES ("9", "900", "LAS", "LAX");
INSERT INTO "flights" VALUES ("10", "1000", "HNL", "LAX");