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 "flights" (
"Airline" INT,
"FlightNo" INT,
"SourceAirport" TEXT,
PRIMARY KEY ("Airline", "FlightNo")
);





INSERT INTO "airlines" VALUES ("1", "United Airlines", "United States");
INSERT INTO "airlines" VALUES ("2", "Delta Airlines", "United States");
INSERT INTO "airlines" VALUES ("3", "Lufthansa", "Germany");
INSERT INTO "airlines" VALUES ("4", "Emirates", "United Arab Emirates");
INSERT INTO "airlines" VALUES ("5", "Air Canada", "Canada");
INSERT INTO "airlines" VALUES ("6", "United Airlines", "United States");
INSERT INTO "airlines" VALUES ("7", "Qantas", "Australia");
INSERT INTO "flights" VALUES ("1", "100", "JFK");
INSERT INTO "flights" VALUES ("1", "101", "LAX");
INSERT INTO "flights" VALUES ("1", "102", "ORD");
INSERT INTO "flights" VALUES ("2", "200", "ATL");
INSERT INTO "flights" VALUES ("2", "201", "MSP");
INSERT INTO "flights" VALUES ("3", "300", "FRA");
INSERT INTO "flights" VALUES ("3", "301", "MUC");
INSERT INTO "flights" VALUES ("4", "400", "DXB");
INSERT INTO "flights" VALUES ("5", "500", "YYZ");
INSERT INTO "flights" VALUES ("6", "600", "SFO");
INSERT INTO "flights" VALUES ("6", "601", "DEN");
INSERT INTO "flights" VALUES ("7", "700", "SYD");