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", "United Airlines", "UA");
INSERT INTO "airlines" VALUES ("2", "American Airlines", "AA");
INSERT INTO "airlines" VALUES ("3", "Delta Airlines", "DL");
INSERT INTO "airlines" VALUES ("4", "Southwest Airlines", "WN");
INSERT INTO "airlines" VALUES ("5", "Alaska Airlines", "AS");
INSERT INTO "airlines" VALUES ("6", "JetBlue Airways", "B6");
INSERT INTO "flights" VALUES ("1", "101", "ORD", "LAX");
INSERT INTO "flights" VALUES ("1", "102", "LAX", "ORD");
INSERT INTO "flights" VALUES ("1", "203", "SFO", "JFK");
INSERT INTO "flights" VALUES ("2", "301", "DFW", "MIA");
INSERT INTO "flights" VALUES ("3", "405", "ATL", "DEN");
INSERT INTO "flights" VALUES ("1", "500", "EWR", "SFO");
INSERT INTO "flights" VALUES ("4", "601", "MDW", "LAS");
INSERT INTO "flights" VALUES ("5", "702", "SEA", "PHX");
INSERT INTO "flights" VALUES ("1", "808", "DEN", "ORD");
INSERT INTO "flights" VALUES ("6", "901", "BOS", "MCO");