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

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
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");
INSERT INTO "country" VALUES ("CAN", "Canada");
INSERT INTO "country" VALUES ("MEX", "Mexico");
INSERT INTO "country" VALUES ("GBR", "United Kingdom");
INSERT INTO "country" VALUES ("FRA", "France");
INSERT INTO "country" VALUES ("DEU", "Germany");
INSERT INTO "country" VALUES ("JPN", "Japan");
INSERT INTO "country" VALUES ("CHN", "China");
INSERT INTO "country" VALUES ("IND", "India");
INSERT INTO "country" VALUES ("BRA", "Brazil");
INSERT INTO "country" VALUES ("ARG", "Argentina");
INSERT INTO "country" VALUES ("AUS", "Australia");
INSERT INTO "country" VALUES ("NZL", "New Zealand");
INSERT INTO "country" VALUES ("ESP", "Spain");
INSERT INTO "country" VALUES ("ITA", "Italy");
INSERT INTO "country" VALUES ("RUS", "Russia");
INSERT INTO "country" VALUES ("EGY", "Egypt");
INSERT INTO "country" VALUES ("ZAF", "South Africa");
INSERT INTO "country" VALUES ("NGA", "Nigeria");
INSERT INTO "country" VALUES ("KEN", "Kenya");
INSERT INTO "city" VALUES ("1", "USA");
INSERT INTO "city" VALUES ("2", "CAN");
INSERT INTO "city" VALUES ("3", "MEX");
INSERT INTO "city" VALUES ("4", "GBR");
INSERT INTO "city" VALUES ("5", "FRA");
INSERT INTO "city" VALUES ("6", "DEU");
INSERT INTO "city" VALUES ("7", "JPN");
INSERT INTO "city" VALUES ("8", "CHN");
INSERT INTO "city" VALUES ("9", "IND");
INSERT INTO "city" VALUES ("10", "BRA");
INSERT INTO "city" VALUES ("11", "ARG");
INSERT INTO "city" VALUES ("12", "AUS");
INSERT INTO "city" VALUES ("13", "NZL");
INSERT INTO "city" VALUES ("14", "ESP");
INSERT INTO "city" VALUES ("15", "ITA");
INSERT INTO "city" VALUES ("16", "RUS");
INSERT INTO "city" VALUES ("17", "EGY");
INSERT INTO "city" VALUES ("18", "ZAF");
INSERT INTO "city" VALUES ("19", "NGA");
INSERT INTO "city" VALUES ("20", "KEN");
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 ("GBR", "English");
INSERT INTO "countrylanguage" VALUES ("FRA", "French");
INSERT INTO "countrylanguage" VALUES ("DEU", "German");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi");
INSERT INTO "countrylanguage" VALUES ("IND", "English");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish");
INSERT INTO "countrylanguage" VALUES ("AUS", "English");
INSERT INTO "countrylanguage" VALUES ("NZL", "English");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish");
INSERT INTO "countrylanguage" VALUES ("ITA", "Italian");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English");
INSERT INTO "countrylanguage" VALUES ("NGA", "English");
INSERT INTO "countrylanguage" VALUES ("NGA", "Hausa");
INSERT INTO "countrylanguage" VALUES ("KEN", "Swahili");
INSERT INTO "countrylanguage" VALUES ("KEN", "English");