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),
"Population" INT,
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
"IsOfficial" TEXT,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);





INSERT INTO "country" VALUES ("USA", "United States", "331000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "38000000");
INSERT INTO "country" VALUES ("MEX", "Mexico", "128000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "67000000");
INSERT INTO "country" VALUES ("FRA", "France", "65000000");
INSERT INTO "country" VALUES ("DEU", "Germany", "83000000");
INSERT INTO "country" VALUES ("JPN", "Japan", "126000000");
INSERT INTO "country" VALUES ("CHN", "China", "1441000000");
INSERT INTO "country" VALUES ("IND", "India", "1380000000");
INSERT INTO "country" VALUES ("BRA", "Brazil", "213000000");
INSERT INTO "country" VALUES ("ARG", "Argentina", "45000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "25000000");
INSERT INTO "country" VALUES ("NZL", "New Zealand", "5000000");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "59000000");
INSERT INTO "country" VALUES ("EGY", "Egypt", "102000000");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "206000000");
INSERT INTO "country" VALUES ("RUS", "Russia", "146000000");
INSERT INTO "country" VALUES ("KOR", "South Korea", "51000000");
INSERT INTO "country" VALUES ("ITA", "Italy", "59000000");
INSERT INTO "country" VALUES ("ESP", "Spain", "47000000");
INSERT INTO "city" VALUES ("1", "New York", "USA");
INSERT INTO "city" VALUES ("2", "Los Angeles", "USA");
INSERT INTO "city" VALUES ("3", "Toronto", "CAN");
INSERT INTO "city" VALUES ("4", "Mexico City", "MEX");
INSERT INTO "city" VALUES ("5", "London", "GBR");
INSERT INTO "city" VALUES ("6", "Paris", "FRA");
INSERT INTO "city" VALUES ("7", "Berlin", "DEU");
INSERT INTO "city" VALUES ("8", "Tokyo", "JPN");
INSERT INTO "city" VALUES ("9", "Beijing", "CHN");
INSERT INTO "city" VALUES ("10", "Mumbai", "IND");
INSERT INTO "city" VALUES ("11", "Rio de Janeiro", "BRA");
INSERT INTO "city" VALUES ("12", "Buenos Aires", "ARG");
INSERT INTO "city" VALUES ("13", "Sydney", "AUS");
INSERT INTO "city" VALUES ("14", "Auckland", "NZL");
INSERT INTO "city" VALUES ("15", "Cape Town", "ZAF");
INSERT INTO "city" VALUES ("16", "Cairo", "EGY");
INSERT INTO "city" VALUES ("17", "Lagos", "NGA");
INSERT INTO "city" VALUES ("18", "Moscow", "RUS");
INSERT INTO "city" VALUES ("19", "Seoul", "KOR");
INSERT INTO "city" VALUES ("20", "Rome", "ITA");
INSERT INTO "city" VALUES ("21", "Madrid", "ESP");
INSERT INTO "city" VALUES ("22", "Vancouver", "CAN");
INSERT INTO "city" VALUES ("23", "Shanghai", "CHN");
INSERT INTO "city" VALUES ("24", "Delhi", "IND");
INSERT INTO "city" VALUES ("25", "Sao Paulo", "BRA");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "F");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "T");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "T");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "F");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "T");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish", "T");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("NZL", "English", "T");
INSERT INTO "countrylanguage" VALUES ("NZL", "Maori", "T");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans", "T");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "T");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "T");
INSERT INTO "countrylanguage" VALUES ("NGA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("NGA", "Hausa", "F");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian", "T");
INSERT INTO "countrylanguage" VALUES ("KOR", "Korean", "T");
INSERT INTO "countrylanguage" VALUES ("ITA", "Italian", "T");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish", "T");
INSERT INTO "countrylanguage" VALUES ("ESP", "Catalan", "F");
INSERT INTO "countrylanguage" VALUES ("DEU", "English", "F");
INSERT INTO "countrylanguage" VALUES ("FRA", "English", "F");
INSERT INTO "countrylanguage" VALUES ("JPN", "English", "F");
INSERT INTO "countrylanguage" VALUES ("CHN", "English", "F");
INSERT INTO "countrylanguage" VALUES ("BRA", "English", "F");
INSERT INTO "countrylanguage" VALUES ("ARG", "English", "F");
INSERT INTO "countrylanguage" VALUES ("EGY", "English", "F");
INSERT INTO "countrylanguage" VALUES ("RUS", "English", "F");
INSERT INTO "countrylanguage" VALUES ("KOR", "English", "F");
INSERT INTO "countrylanguage" VALUES ("ITA", "English", "F");
INSERT INTO "countrylanguage" VALUES ("ESP", "English", "F");