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,
"Abbreviation" TEXT,
"Country" 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", "United Airlines", "UAL", "United States");
INSERT INTO "airlines" VALUES ("2", "Universal Air Logistics", "UALL", "United Kingdom");
INSERT INTO "airlines" VALUES ("3", "Union Air Lines", "UNAL", "Canada");
INSERT INTO "airlines" VALUES ("4", "Urban Air Link", "UALX", "Australia");
INSERT INTO "airlines" VALUES ("5", "Ultra Air", "ULTRA", "Germany");
INSERT INTO "airlines" VALUES ("6", "United Atlantic Lines", "UALC", "United States");
INSERT INTO "airlines" VALUES ("7", "Unalaska Air", "UNLA", "Alaska");
INSERT INTO "airlines" VALUES ("8", "Upland Airlines", "UPLA", "Mexico");
INSERT INTO "airlines" VALUES ("9", "Universal Aviation", "UAVA", "Brazil");
INSERT INTO "airlines" VALUES ("10", "Ultimate Air", "ULTA", "South Africa");
INSERT INTO "airports" VALUES ("JFK");
INSERT INTO "airports" VALUES ("LAX");
INSERT INTO "airports" VALUES ("ORD");
INSERT INTO "airports" VALUES ("DFW");
INSERT INTO "airports" VALUES ("DEN");
INSERT INTO "airports" VALUES ("SFO");
INSERT INTO "airports" VALUES ("ATL");
INSERT INTO "airports" VALUES ("SEA");
INSERT INTO "airports" VALUES ("MIA");
INSERT INTO "airports" VALUES ("BOS");
INSERT INTO "flights" VALUES ("1", "100");
INSERT INTO "flights" VALUES ("1", "101");
INSERT INTO "flights" VALUES ("2", "200");
INSERT INTO "flights" VALUES ("3", "300");
INSERT INTO "flights" VALUES ("4", "400");
INSERT INTO "flights" VALUES ("5", "500");
INSERT INTO "flights" VALUES ("6", "600");
INSERT INTO "flights" VALUES ("7", "700");
INSERT INTO "flights" VALUES ("8", "800");
INSERT INTO "flights" VALUES ("9", "900");
INSERT INTO "flights" VALUES ("10", "1000");