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

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Continent" TEXT,
"Region" CHAR(26),
"LocalName" CHAR(45),
PRIMARY KEY ("Code")
);





INSERT INTO "country" VALUES ("AFG", "Afghanistan", "Asia", "Southern and Central Asia", "Afganistan");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "North America", "United States");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "North America", "Canada");
INSERT INTO "country" VALUES ("MEX", "Mexico", "North America", "Central America", "Mxico");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America", "South America", "Brasil");
INSERT INTO "country" VALUES ("ARG", "Argentina", "South America", "South America", "Argentina");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "Western Europe", "United Kingdom");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "Western Europe", "France");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "Western Europe", "Deutschland");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "Eastern Asia", "Zhongguo");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "Southern and Central Asia", "Bharat");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia", "Eastern Asia", "Nihon");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "Australia and New Zealand", "Australia");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "Northern Africa", "Misr");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "Africa", "Western Africa", "Nigeria");
INSERT INTO "city" VALUES ("1", "Kabul", "AFG");
INSERT INTO "city" VALUES ("2", "Washington", "USA");
INSERT INTO "city" VALUES ("3", "Ottawa", "CAN");
INSERT INTO "city" VALUES ("4", "Mexico City", "MEX");
INSERT INTO "city" VALUES ("5", "Brasilia", "BRA");
INSERT INTO "city" VALUES ("6", "Buenos Aires", "ARG");
INSERT INTO "city" VALUES ("7", "London", "GBR");
INSERT INTO "city" VALUES ("8", "Paris", "FRA");
INSERT INTO "city" VALUES ("9", "Berlin", "DEU");
INSERT INTO "city" VALUES ("10", "Beijing", "CHN");
INSERT INTO "city" VALUES ("11", "New Delhi", "IND");
INSERT INTO "city" VALUES ("12", "Tokyo", "JPN");
INSERT INTO "city" VALUES ("13", "Canberra", "AUS");
INSERT INTO "city" VALUES ("14", "Cairo", "EGY");
INSERT INTO "city" VALUES ("15", "Abuja", "NGA");
INSERT INTO "city" VALUES ("16", "Herat", "AFG");
INSERT INTO "city" VALUES ("17", "Kandahar", "AFG");
INSERT INTO "city" VALUES ("18", "New York", "USA");
INSERT INTO "city" VALUES ("19", "Los Angeles", "USA");
INSERT INTO "city" VALUES ("20", "Toronto", "CAN");