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

CREATE TABLE "flights" (
"Airline" INT,
"FlightNo" INT,
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", "Australia");
INSERT INTO "airlines" VALUES ("4", "Northern Air", "Canada");
INSERT INTO "airlines" VALUES ("5", "Eastern Skies", "Japan");
INSERT INTO "airports" VALUES ("New York", "JFK", "John F. Kennedy International Airport");
INSERT INTO "airports" VALUES ("London", "LHR", "Heathrow Airport");
INSERT INTO "airports" VALUES ("Sydney", "SYD", "Sydney Kingsford Smith Airport");
INSERT INTO "airports" VALUES ("Toronto", "YYZ", "Toronto Pearson International Airport");
INSERT INTO "airports" VALUES ("Tokyo", "HND", "Haneda Airport");
INSERT INTO "flights" VALUES ("1", "101");
INSERT INTO "flights" VALUES ("1", "102");
INSERT INTO "flights" VALUES ("1", "103");
INSERT INTO "flights" VALUES ("1", "104");
INSERT INTO "flights" VALUES ("1", "105");
INSERT INTO "flights" VALUES ("1", "106");
INSERT INTO "flights" VALUES ("2", "201");
INSERT INTO "flights" VALUES ("2", "202");
INSERT INTO "flights" VALUES ("2", "203");
INSERT INTO "flights" VALUES ("3", "301");
INSERT INTO "flights" VALUES ("3", "302");
INSERT INTO "flights" VALUES ("3", "303");
INSERT INTO "flights" VALUES ("3", "304");
INSERT INTO "flights" VALUES ("3", "305");
INSERT INTO "flights" VALUES ("3", "306");
INSERT INTO "flights" VALUES ("3", "307");
INSERT INTO "flights" VALUES ("4", "401");
INSERT INTO "flights" VALUES ("4", "402");
INSERT INTO "flights" VALUES ("5", "501");