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,
"Country" 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", "United States");
INSERT INTO "airlines" VALUES ("2", "Delta Air Lines", "United States");
INSERT INTO "airlines" VALUES ("3", "Lufthansa", "Germany");
INSERT INTO "airlines" VALUES ("4", "Emirates", "United Arab Emirates");
INSERT INTO "airlines" VALUES ("5", "Air Canada", "Canada");
INSERT INTO "airlines" VALUES ("6", "Qantas", "Australia");
INSERT INTO "airlines" VALUES ("7", "JetBlue Airways", "United States");
INSERT INTO "airlines" VALUES ("8", "Southwest Airlines", "United States");
INSERT INTO "flights" VALUES ("1", "1001", "JFK", "LAX");
INSERT INTO "flights" VALUES ("1", "1002", "BOS", "MCO");
INSERT INTO "flights" VALUES ("1", "1003", "FLL", "ORD");
INSERT INTO "flights" VALUES ("1", "1004", "JFK", "SFO");
INSERT INTO "flights" VALUES ("1", "1005", "LGA", "MIA");
INSERT INTO "flights" VALUES ("2", "2001", "ATL", "LAX");
INSERT INTO "flights" VALUES ("2", "2002", "DTW", "JFK");
INSERT INTO "flights" VALUES ("3", "3001", "FRA", "JFK");
INSERT INTO "flights" VALUES ("3", "3002", "MUC", "LHR");
INSERT INTO "flights" VALUES ("4", "4001", "DXB", "LHR");
INSERT INTO "flights" VALUES ("5", "5001", "YYZ", "LAX");
INSERT INTO "flights" VALUES ("6", "6001", "SYD", "MEL");
INSERT INTO "flights" VALUES ("7", "7001", "JFK", "ORD");
INSERT INTO "flights" VALUES ("7", "7002", "BOS", "PHL");
INSERT INTO "flights" VALUES ("7", "7003", "FLL", "ATL");
INSERT INTO "flights" VALUES ("8", "8001", "DAL", "HOU");
INSERT INTO "flights" VALUES ("8", "8002", "HOU", "MCO");