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

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

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





INSERT INTO "airlines" VALUES ("1", "JetBlue Airways", "JBU");
INSERT INTO "airlines" VALUES ("2", "Delta Air Lines", "DAL");
INSERT INTO "airlines" VALUES ("3", "American Airlines", "AAL");
INSERT INTO "airlines" VALUES ("4", "United Airlines", "UAL");
INSERT INTO "airlines" VALUES ("5", "Southwest Airlines", "SWA");
INSERT INTO "airlines" VALUES ("6", "Alaska Airlines", "ASA");
INSERT INTO "airlines" VALUES ("7", "Spirit Airlines", "NKS");
INSERT INTO "airlines" VALUES ("8", "Frontier Airlines", "FFT");
INSERT INTO "airlines" VALUES ("9", "Hawaiian Airlines", "HAL");
INSERT INTO "airlines" VALUES ("10", "Allegiant Air", "AAY");
INSERT INTO "airports" VALUES ("JFK", "United States");
INSERT INTO "airports" VALUES ("LAX", "United States");
INSERT INTO "airports" VALUES ("ORD", "United States");
INSERT INTO "airports" VALUES ("ATL", "United States");
INSERT INTO "airports" VALUES ("BOS", "United States");
INSERT INTO "airports" VALUES ("MIA", "United States");
INSERT INTO "airports" VALUES ("SFO", "United States");
INSERT INTO "airports" VALUES ("SEA", "United States");
INSERT INTO "airports" VALUES ("DEN", "United States");
INSERT INTO "airports" VALUES ("MCO", "United States");
INSERT INTO "flights" VALUES ("1", "100");
INSERT INTO "flights" VALUES ("1", "101");
INSERT INTO "flights" VALUES ("2", "200");
INSERT INTO "flights" VALUES ("2", "201");
INSERT INTO "flights" VALUES ("3", "300");
INSERT INTO "flights" VALUES ("3", "301");
INSERT INTO "flights" VALUES ("4", "400");
INSERT INTO "flights" VALUES ("4", "401");
INSERT INTO "flights" VALUES ("5", "500");
INSERT INTO "flights" VALUES ("5", "501");