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", "JBL");
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", "ORD");
INSERT INTO "flights" VALUES ("2", "201", "ORD", "JFK");
INSERT INTO "flights" VALUES ("2", "202", "JFK", "LAX");
INSERT INTO "flights" VALUES ("3", "301", "LAX", "DEN");
INSERT INTO "flights" VALUES ("3", "302", "DEN", "LAX");
INSERT INTO "flights" VALUES ("3", "303", "LAX", "SEA");
INSERT INTO "flights" VALUES ("3", "304", "SEA", "LAX");
INSERT INTO "flights" VALUES ("4", "401", "JFK", "MIA");
INSERT INTO "flights" VALUES ("4", "402", "MIA", "JFK");
INSERT INTO "flights" VALUES ("4", "403", "JFK", "BOS");
INSERT INTO "flights" VALUES ("4", "404", "BOS", "JFK");
INSERT INTO "flights" VALUES ("4", "405", "JFK", "ORD");
INSERT INTO "flights" VALUES ("5", "501", "SEA", "PDX");
INSERT INTO "flights" VALUES ("6", "601", "BOS", "MCO");
INSERT INTO "flights" VALUES ("7", "701", "MCO", "DFW");
INSERT INTO "flights" VALUES ("8", "801", "DEN", "LAS");
INSERT INTO "flights" VALUES ("9", "901", "LAS", "PHX");
INSERT INTO "flights" VALUES ("10", "1001", "HNL", "OGG");