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", "Air Canada", "Canada");
INSERT INTO "airlines" VALUES ("5", "Qantas", "Australia");
INSERT INTO "airlines" VALUES ("6", "Emirates", "United Arab Emirates");
INSERT INTO "airlines" VALUES ("7", "Southwest Airlines", "United States");
INSERT INTO "airlines" VALUES ("8", "Aeroflot", "Russia");
INSERT INTO "airlines" VALUES ("9", "Iberia", "Spain");
INSERT INTO "airlines" VALUES ("10", "NoFlight Airline", "Nowhere");
INSERT INTO "flights" VALUES ("1", "101", "JFK", "LAX");
INSERT INTO "flights" VALUES ("1", "102", "LAX", "MIA");
INSERT INTO "flights" VALUES ("1", "103", "MIA", "BOS");
INSERT INTO "flights" VALUES ("1", "104", "BOS", "JFK");
INSERT INTO "flights" VALUES ("1", "105", "JFK", "ORD");
INSERT INTO "flights" VALUES ("2", "201", "ATL", "LAX");
INSERT INTO "flights" VALUES ("2", "202", "LAX", "SEA");
INSERT INTO "flights" VALUES ("2", "203", "SEA", "ATL");
INSERT INTO "flights" VALUES ("3", "301", "FRA", "JFK");
INSERT INTO "flights" VALUES ("3", "302", "JFK", "FRA");
INSERT INTO "flights" VALUES ("4", "401", "YYZ", "LHR");
INSERT INTO "flights" VALUES ("4", "402", "LHR", "YYZ");
INSERT INTO "flights" VALUES ("5", "501", "SYD", "MEL");
INSERT INTO "flights" VALUES ("5", "502", "MEL", "SYD");
INSERT INTO "flights" VALUES ("6", "601", "DXB", "LHR");
INSERT INTO "flights" VALUES ("6", "602", "LHR", "DXB");
INSERT INTO "flights" VALUES ("7", "701", "DAL", "HOU");
INSERT INTO "flights" VALUES ("7", "702", "HOU", "DAL");
INSERT INTO "flights" VALUES ("8", "801", "SVO", "LED");
INSERT INTO "flights" VALUES ("8", "802", "LED", "SVO");
INSERT INTO "flights" VALUES ("9", "901", "MAD", "BCN");
INSERT INTO "flights" VALUES ("9", "902", "BCN", "MAD");