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

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





INSERT INTO "country" VALUES ("USA", "United States", "North America");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America");
INSERT INTO "country" VALUES ("MEX", "Mexico", "North America");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America");
INSERT INTO "country" VALUES ("ARG", "Argentina", "South America");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe");
INSERT INTO "country" VALUES ("FRA", "France", "Europe");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe");
INSERT INTO "country" VALUES ("CHN", "China", "Asia");
INSERT INTO "country" VALUES ("IND", "India", "Asia");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania");
INSERT INTO "country" VALUES ("NZL", "New Zealand", "Oceania");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "Africa");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Africa");
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", "Rio de Janeiro", "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", "Mumbai", "IND");
INSERT INTO "city" VALUES ("12", "Tokyo", "JPN");
INSERT INTO "city" VALUES ("13", "Sydney", "AUS");
INSERT INTO "city" VALUES ("14", "Cairo", "EGY");
INSERT INTO "city" VALUES ("15", "Lagos", "NGA");
INSERT INTO "city" VALUES ("16", "Cape Town", "ZAF");
INSERT INTO "countrylanguage" VALUES ("USA", "English");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish");
INSERT INTO "countrylanguage" VALUES ("CAN", "English");
INSERT INTO "countrylanguage" VALUES ("CAN", "French");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish");
INSERT INTO "countrylanguage" VALUES ("GBR", "English");
INSERT INTO "countrylanguage" VALUES ("FRA", "French");
INSERT INTO "countrylanguage" VALUES ("DEU", "German");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi");
INSERT INTO "countrylanguage" VALUES ("IND", "English");
INSERT INTO "countrylanguage" VALUES ("IND", "Tamil");
INSERT INTO "countrylanguage" VALUES ("IND", "Bengali");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese");
INSERT INTO "countrylanguage" VALUES ("AUS", "English");
INSERT INTO "countrylanguage" VALUES ("NZL", "English");
INSERT INTO "countrylanguage" VALUES ("NZL", "Maori");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic");
INSERT INTO "countrylanguage" VALUES ("NGA", "English");
INSERT INTO "countrylanguage" VALUES ("NGA", "Hausa");
INSERT INTO "countrylanguage" VALUES ("NGA", "Yoruba");
INSERT INTO "countrylanguage" VALUES ("NGA", "Igbo");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Xhosa");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Sotho");