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", "JetBlue Airways", "B6");
INSERT INTO "airlines" VALUES ("2", "Southwest Airlines", "WN");
INSERT INTO "airlines" VALUES ("3", "American Airlines", "AA");
INSERT INTO "airlines" VALUES ("4", "Delta Air Lines", "DL");
INSERT INTO "airlines" VALUES ("5", "United Airlines", "UA");
INSERT INTO "airlines" VALUES ("6", "Alaska Airlines", "AS");
INSERT INTO "airlines" VALUES ("7", "Spirit Airlines", "NK");
INSERT INTO "flights" VALUES ("1", "101", "JFK", "LAX");
INSERT INTO "flights" VALUES ("1", "102", "LAX", "JFK");
INSERT INTO "flights" VALUES ("1", "203", "BOS", "MIA");
INSERT INTO "flights" VALUES ("1", "204", "MIA", "BOS");
INSERT INTO "flights" VALUES ("2", "301", "DAL", "HOU");
INSERT INTO "flights" VALUES ("2", "302", "HOU", "DAL");
INSERT INTO "flights" VALUES ("3", "401", "DFW", "ORD");
INSERT INTO "flights" VALUES ("3", "402", "ORD", "DFW");
INSERT INTO "flights" VALUES ("4", "501", "ATL", "DEN");
INSERT INTO "flights" VALUES ("5", "601", "SFO", "EWR");
INSERT INTO "flights" VALUES ("1", "105", "JFK", "SFO");
INSERT INTO "flights" VALUES ("1", "106", "SFO", "JFK");
INSERT INTO "flights" VALUES ("1", "207", "BOS", "ORD");
INSERT INTO "flights" VALUES ("6", "701", "SEA", "PDX");
INSERT INTO "flights" VALUES ("7", "801", "FLL", "LGA");