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 "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Region" CHAR(26),
"Population" INT,
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 of America", "North America", "331002651");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "1439323776");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1380004385");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America", "212559417");
INSERT INTO "country" VALUES ("RUS", "Russia", "Europe", "145934462");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Africa", "59308690");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65273511");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "83783942");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia", "126476461");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "37742154");
INSERT INTO "country" VALUES ("MEX", "Mexico", "North America", "128932753");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "102334404");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25499884");
INSERT INTO "country" VALUES ("ARG", "Argentina", "South America", "45195774");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "Africa", "206139589");
INSERT INTO "country" VALUES ("ESP", "Spain", "Europe", "46754778");
INSERT INTO "country" VALUES ("KOR", "South Korea", "Asia", "51269185");
INSERT INTO "country" VALUES ("TUR", "Turkey", "Asia", "84339067");
INSERT INTO "country" VALUES ("SAU", "Saudi Arabia", "Asia", "34813871");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67886011");
INSERT INTO "countrylanguage" VALUES ("USA", "English");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin");
INSERT INTO "countrylanguage" VALUES ("CHN", "Cantonese");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi");
INSERT INTO "countrylanguage" VALUES ("IND", "English");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese");
INSERT INTO "countrylanguage" VALUES ("RUS", "Russian");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Xhosa");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans");
INSERT INTO "countrylanguage" VALUES ("FRA", "French");
INSERT INTO "countrylanguage" VALUES ("DEU", "German");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese");
INSERT INTO "countrylanguage" VALUES ("CAN", "English");
INSERT INTO "countrylanguage" VALUES ("CAN", "French");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic");
INSERT INTO "countrylanguage" VALUES ("AUS", "English");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish");
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 ("ESP", "Spanish");
INSERT INTO "countrylanguage" VALUES ("KOR", "Korean");
INSERT INTO "countrylanguage" VALUES ("TUR", "Turkish");
INSERT INTO "countrylanguage" VALUES ("SAU", "Arabic");
INSERT INTO "countrylanguage" VALUES ("GBR", "English");
INSERT INTO "countrylanguage" VALUES ("GBR", "Welsh");
INSERT INTO "countrylanguage" VALUES ("GBR", "Scottish Gaelic");