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,
PRIMARY KEY ("uid")
);

CREATE TABLE "airports" (
"AirportCode" TEXT UNIQUE,
PRIMARY KEY ("AirportCode")
);

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





INSERT INTO "airlines" VALUES ("1", "SkyHigh Airways");
INSERT INTO "airlines" VALUES ("2", "BlueSky Airlines");
INSERT INTO "airlines" VALUES ("3", "SkyHigh Express");
INSERT INTO "airlines" VALUES ("4", "Global Wings");
INSERT INTO "airlines" VALUES ("5", "Eagle Air");
INSERT INTO "airlines" VALUES ("6", "Sunset Flights");
INSERT INTO "airlines" VALUES ("7", "Northern Lights");
INSERT INTO "airlines" VALUES ("8", "Oceanic Air");
INSERT INTO "airlines" VALUES ("9", "Mountain Air");
INSERT INTO "airlines" VALUES ("10", "Zero Flights Airline");
INSERT INTO "airlines" VALUES ("11", "SkyHigh Cargo");
INSERT INTO "airlines" VALUES ("12", "BlueSky Regional");
INSERT INTO "airports" VALUES ("JFK");
INSERT INTO "airports" VALUES ("LAX");
INSERT INTO "airports" VALUES ("ORD");
INSERT INTO "airports" VALUES ("ATL");
INSERT INTO "airports" VALUES ("DFW");
INSERT INTO "airports" VALUES ("DEN");
INSERT INTO "airports" VALUES ("SFO");
INSERT INTO "airports" VALUES ("SEA");
INSERT INTO "flights" VALUES ("1", "101");
INSERT INTO "flights" VALUES ("1", "102");
INSERT INTO "flights" VALUES ("2", "201");
INSERT INTO "flights" VALUES ("2", "202");
INSERT INTO "flights" VALUES ("3", "301");
INSERT INTO "flights" VALUES ("4", "401");
INSERT INTO "flights" VALUES ("4", "402");
INSERT INTO "flights" VALUES ("4", "403");
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 ("11", "1101");
INSERT INTO "flights" VALUES ("12", "1201");
INSERT INTO "flights" VALUES ("12", "1202");