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 "city" (
"ID" INT,
"CountryCode" CHAR(3),
"Population" INT,
PRIMARY KEY ("ID"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Continent" TEXT,
"Population" INT,
PRIMARY KEY ("Code")
);





INSERT INTO "country" VALUES ("AIA", "Anguilla", "North America", "15000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "331000000");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "67000000");
INSERT INTO "country" VALUES ("RUS", "Russia", "Europe/Asia", "144000000");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "102000000");
INSERT INTO "country" VALUES ("TWN", "Taiwan", "Asia", "23500000");
INSERT INTO "country" VALUES ("ISR", "Israel", "Asia", "9000000");
INSERT INTO "country" VALUES ("KOS", "Kosovo", "Europe", "1800000");
INSERT INTO "country" VALUES ("GIB", "Gibraltar", "Europe", "34000");
INSERT INTO "country" VALUES ("CYP", "Cyprus", "Europe/Asia", "1200000");
INSERT INTO "country" VALUES ("ATA", "Antarctica", "Antarctica", "0");
INSERT INTO "country" VALUES ("SGP", "Singapore", "Asia", "5700000");
INSERT INTO "country" VALUES ("BRB", "Barbados", "North America", "287000");
INSERT INTO "country" VALUES ("VGB", "British Virgin Islands", "North America", "30000");
INSERT INTO "country" VALUES ("MEX", "Mexico", "North America", "128000000");
INSERT INTO "city" VALUES ("1", "AIA", "15000");
INSERT INTO "city" VALUES ("2", "USA", "8800000");
INSERT INTO "city" VALUES ("3", "USA", "4000000");
INSERT INTO "city" VALUES ("4", "FRA", "2140000");
INSERT INTO "city" VALUES ("5", "RUS", "12000000");
INSERT INTO "city" VALUES ("6", "EGY", "9500000");
INSERT INTO "city" VALUES ("7", "TWN", "2700000");
INSERT INTO "city" VALUES ("8", "ISR", "900000");
INSERT INTO "city" VALUES ("9", "KOS", "200000");
INSERT INTO "city" VALUES ("10", "GIB", "34000");
INSERT INTO "city" VALUES ("11", "CYP", "200000");
INSERT INTO "city" VALUES ("12", "SGP", "5600000");
INSERT INTO "city" VALUES ("13", "BRB", "110000");
INSERT INTO "city" VALUES ("14", "VGB", "30000");
INSERT INTO "city" VALUES ("15", "MEX", "9000000");