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", "SEA");
INSERT INTO "flights" VALUES ("1", "102", "SEA", "LAX");
INSERT INTO "flights" VALUES ("2", "200", "ORD", "JFK");
INSERT INTO "flights" VALUES ("2", "201", "JFK", "MIA");
INSERT INTO "flights" VALUES ("2", "202", "MIA", "ORD");
INSERT INTO "flights" VALUES ("3", "300", "ATL", "DEN");
INSERT INTO "flights" VALUES ("3", "301", "DEN", "DFW");
INSERT INTO "flights" VALUES ("3", "302", "DFW", "ATL");
INSERT INTO "flights" VALUES ("4", "400", "EWR", "ORD");
INSERT INTO "flights" VALUES ("4", "401", "ORD", "LAX");
INSERT INTO "flights" VALUES ("5", "500", "SEA", "ANC");
INSERT INTO "flights" VALUES ("5", "501", "ANC", "PDX");
INSERT INTO "flights" VALUES ("6", "600", "BOS", "FLL");
INSERT INTO "flights" VALUES ("6", "601", "FLL", "LGA");
INSERT INTO "flights" VALUES ("7", "700", "MCO", "DTW");
INSERT INTO "flights" VALUES ("8", "800", "DEN", "LAS");
INSERT INTO "flights" VALUES ("9", "900", "LAS", "SFB");
INSERT INTO "flights" VALUES ("10", "1000", "HNL", "OGG");
INSERT INTO "flights" VALUES ("1", "103", "LAX", "PHX");
INSERT INTO "flights" VALUES ("1", "104", "PHX", "DEN");
INSERT INTO "flights" VALUES ("2", "203", "DFW", "LAX");
INSERT INTO "flights" VALUES ("2", "204", "LAX", "ORD");
INSERT INTO "flights" VALUES ("3", "303", "ATL", "MCO");
INSERT INTO "flights" VALUES ("3", "304", "MCO", "JFK");
INSERT INTO "flights" VALUES ("4", "402", "SFO", "DEN");
INSERT INTO "flights" VALUES ("4", "403", "DEN", "ORD");
INSERT INTO "flights" VALUES ("1", "105", "DEN", "SFO");