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

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





INSERT INTO "airlines" VALUES ("1", "Jetblue Airways", "USA");
INSERT INTO "airlines" VALUES ("2", "Air Canada", "Canada");
INSERT INTO "airlines" VALUES ("3", "Lufthansa", "Germany");
INSERT INTO "airlines" VALUES ("4", "British Airways", "UK");
INSERT INTO "airlines" VALUES ("5", "Qantas", "Australia");
INSERT INTO "airlines" VALUES ("6", "Emirates", "UAE");
INSERT INTO "airlines" VALUES ("7", "Air France", "France");
INSERT INTO "airlines" VALUES ("8", "ANA", "Japan");
INSERT INTO "airlines" VALUES ("9", "Cathay Pacific", "Hong Kong");
INSERT INTO "airlines" VALUES ("10", "Singapore Airlines", "Singapore");
INSERT INTO "airports" VALUES ("JFK", "John F. Kennedy International Airport", "USA");
INSERT INTO "airports" VALUES ("LHR", "Heathrow Airport", "UK");
INSERT INTO "airports" VALUES ("CDG", "Charles de Gaulle Airport", "France");
INSERT INTO "airports" VALUES ("DXB", "Dubai International Airport", "UAE");
INSERT INTO "airports" VALUES ("SYD", "Sydney Airport", "Australia");
INSERT INTO "airports" VALUES ("YYZ", "Toronto Pearson International Airport", "Canada");
INSERT INTO "airports" VALUES ("FRA", "Frankfurt Airport", "Germany");
INSERT INTO "airports" VALUES ("NRT", "Narita International Airport", "Japan");
INSERT INTO "airports" VALUES ("HKG", "Hong Kong International Airport", "Hong Kong");
INSERT INTO "airports" VALUES ("SIN", "Singapore Changi Airport", "Singapore");
INSERT INTO "flights" VALUES ("1", "101");
INSERT INTO "flights" VALUES ("1", "102");
INSERT INTO "flights" VALUES ("2", "201");
INSERT INTO "flights" VALUES ("3", "301");
INSERT INTO "flights" VALUES ("4", "401");
INSERT INTO "flights" VALUES ("5", "501");
INSERT INTO "flights" VALUES ("6", "601");
INSERT INTO "flights" VALUES ("7", "701");
INSERT INTO "flights" VALUES ("8", "801");
INSERT INTO "flights" VALUES ("9", "901");
INSERT INTO "flights" VALUES ("10", "1001");
INSERT INTO "flights" VALUES ("1", "103");
INSERT INTO "flights" VALUES ("2", "202");
INSERT INTO "flights" VALUES ("3", "302");