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", "SkyHigh Airways", "USA");
INSERT INTO "airlines" VALUES ("2", "Global Wings", "UK");
INSERT INTO "airlines" VALUES ("3", "Sunset Flights", "Canada");
INSERT INTO "airlines" VALUES ("4", "Oceanic Air", "Australia");
INSERT INTO "airlines" VALUES ("5", "Mountain Air", "Switzerland");
INSERT INTO "airlines" VALUES ("6", "Desert Jet", "UAE");
INSERT INTO "flights" VALUES ("1", "101", "JFK", "LAX");
INSERT INTO "flights" VALUES ("1", "102", "JFK", "ORD");
INSERT INTO "flights" VALUES ("1", "103", "JFK", "MIA");
INSERT INTO "flights" VALUES ("1", "104", "LAX", "SEA");
INSERT INTO "flights" VALUES ("1", "105", "LAX", "DEN");
INSERT INTO "flights" VALUES ("1", "106", "ORD", "ATL");
INSERT INTO "flights" VALUES ("1", "107", "MIA", "BOS");
INSERT INTO "flights" VALUES ("1", "108", "SEA", "SFO");
INSERT INTO "flights" VALUES ("1", "109", "DEN", "PHX");
INSERT INTO "flights" VALUES ("1", "110", "ATL", "JFK");
INSERT INTO "flights" VALUES ("2", "201", "LHR", "CDG");
INSERT INTO "flights" VALUES ("2", "202", "LHR", "FRA");
INSERT INTO "flights" VALUES ("2", "203", "LHR", "AMS");
INSERT INTO "flights" VALUES ("2", "204", "CDG", "MAD");
INSERT INTO "flights" VALUES ("2", "205", "FRA", "BCN");
INSERT INTO "flights" VALUES ("2", "206", "AMS", "DUB");
INSERT INTO "flights" VALUES ("2", "207", "MAD", "LIS");
INSERT INTO "flights" VALUES ("2", "208", "BCN", "MAN");
INSERT INTO "flights" VALUES ("2", "209", "DUB", "EDI");
INSERT INTO "flights" VALUES ("2", "210", "LIS", "STN");
INSERT INTO "flights" VALUES ("3", "301", "YYZ", "YVR");
INSERT INTO "flights" VALUES ("3", "302", "YYZ", "YUL");
INSERT INTO "flights" VALUES ("3", "303", "YVR", "YYC");
INSERT INTO "flights" VALUES ("3", "304", "YUL", "YEG");
INSERT INTO "flights" VALUES ("3", "305", "YYC", "YHZ");
INSERT INTO "flights" VALUES ("3", "306", "YEG", "YYZ");
INSERT INTO "flights" VALUES ("3", "307", "YHZ", "YVR");
INSERT INTO "flights" VALUES ("3", "308", "YYZ", "YUL");
INSERT INTO "flights" VALUES ("3", "309", "YUL", "YYC");
INSERT INTO "flights" VALUES ("4", "401", "SYD", "MEL");
INSERT INTO "flights" VALUES ("4", "402", "SYD", "BNE");
INSERT INTO "flights" VALUES ("4", "403", "MEL", "PER");
INSERT INTO "flights" VALUES ("4", "404", "BNE", "ADL");
INSERT INTO "flights" VALUES ("4", "405", "PER", "CNS");
INSERT INTO "flights" VALUES ("4", "406", "ADL", "HBA");
INSERT INTO "flights" VALUES ("4", "407", "CNS", "SYD");
INSERT INTO "flights" VALUES ("4", "408", "HBA", "MEL");
INSERT INTO "flights" VALUES ("4", "409", "SYD", "CNS");
INSERT INTO "flights" VALUES ("4", "410", "MEL", "BNE");
INSERT INTO "flights" VALUES ("4", "411", "BNE", "PER");
INSERT INTO "flights" VALUES ("5", "501", "ZRH", "GVA");
INSERT INTO "flights" VALUES ("5", "502", "ZRH", "BSL");
INSERT INTO "flights" VALUES ("5", "503", "GVA", "ZRH");
INSERT INTO "flights" VALUES ("5", "504", "BSL", "GVA");
INSERT INTO "flights" VALUES ("5", "505", "ZRH", "BSL");
INSERT INTO "flights" VALUES ("6", "601", "DXB", "AUH");
INSERT INTO "flights" VALUES ("6", "602", "DXB", "SHJ");
INSERT INTO "flights" VALUES ("6", "603", "AUH", "DXB");
INSERT INTO "flights" VALUES ("6", "604", "SHJ", "DXB");
INSERT INTO "flights" VALUES ("6", "605", "DXB", "FJR");
INSERT INTO "flights" VALUES ("6", "606", "FJR", "AUH");
INSERT INTO "flights" VALUES ("6", "607", "AUH", "SHJ");
INSERT INTO "flights" VALUES ("6", "608", "SHJ", "FJR");
INSERT INTO "flights" VALUES ("6", "609", "FJR", "DXB");
INSERT INTO "flights" VALUES ("6", "610", "DXB", "AUH");