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 "airports" (
"AirportCode" TEXT,
"Country" TEXT,
"CountryAbbrev" TEXT,
PRIMARY KEY ("AirportCode")
);

CREATE TABLE "flights" (
"Airline" INT,
"FlightNo" INT,
PRIMARY KEY ("Airline", "FlightNo")
);





INSERT INTO "airlines" VALUES ("1", "JetBlue Airways", "United States");
INSERT INTO "airlines" VALUES ("2", "Lufthansa", "Germany");
INSERT INTO "airlines" VALUES ("3", "Air Canada", "Canada");
INSERT INTO "airlines" VALUES ("4", "Qantas", "Australia");
INSERT INTO "airlines" VALUES ("5", "Emirates", "United Arab Emirates");
INSERT INTO "airlines" VALUES ("6", "British Airways", "United Kingdom");
INSERT INTO "airlines" VALUES ("7", "Air France", "France");
INSERT INTO "airlines" VALUES ("8", "ANA", "Japan");
INSERT INTO "airlines" VALUES ("9", "Southwest Airlines", "United States");
INSERT INTO "airlines" VALUES ("10", "Alaska Airlines", "United States");
INSERT INTO "airports" VALUES ("JFK", "United States", "US");
INSERT INTO "airports" VALUES ("LHR", "United Kingdom", "UK");
INSERT INTO "airports" VALUES ("CDG", "France", "FR");
INSERT INTO "airports" VALUES ("FRA", "Germany", "DE");
INSERT INTO "airports" VALUES ("YYZ", "Canada", "CA");
INSERT INTO "airports" VALUES ("SYD", "Australia", "AU");
INSERT INTO "airports" VALUES ("DXB", "United Arab Emirates", "AE");
INSERT INTO "airports" VALUES ("NRT", "Japan", "JP");
INSERT INTO "airports" VALUES ("MIA", "United States", "US");
INSERT INTO "airports" VALUES ("SFO", "United States", "US");
INSERT INTO "flights" VALUES ("1", "1001");
INSERT INTO "flights" VALUES ("1", "1002");
INSERT INTO "flights" VALUES ("2", "2001");
INSERT INTO "flights" VALUES ("3", "3001");
INSERT INTO "flights" VALUES ("4", "4001");
INSERT INTO "flights" VALUES ("5", "5001");
INSERT INTO "flights" VALUES ("6", "6001");
INSERT INTO "flights" VALUES ("7", "7001");
INSERT INTO "flights" VALUES ("8", "8001");
INSERT INTO "flights" VALUES ("9", "9001");
INSERT INTO "flights" VALUES ("10", "10001");