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

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Region" CHAR(26),
"Population" INT,
"LifeExpectancy" FLOAT,
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
PRIMARY KEY ("CountryCode", "Language")
);





INSERT INTO "city" VALUES ("1", "1000000");
INSERT INTO "city" VALUES ("2", "0");
INSERT INTO "city" VALUES ("3", "500000");
INSERT INTO "city" VALUES ("4", "200000");
INSERT INTO "city" VALUES ("5", "750000");
INSERT INTO "city" VALUES ("6", "0");
INSERT INTO "city" VALUES ("7", "1200000");
INSERT INTO "city" VALUES ("8", "300000");
INSERT INTO "city" VALUES ("9", "450000");
INSERT INTO "city" VALUES ("10", "0");
INSERT INTO "country" VALUES ("AGO", "Angola", "Sub-Saharan Africa", "32866272", "61.2");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "Sub-Saharan Africa", "206139589", "54.3");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Sub-Saharan Africa", "59308690", "63.9");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Northern Africa", "102334404", "71.7");
INSERT INTO "country" VALUES ("DZA", "Algeria", "Northern Africa", "43851044", "76.3");
INSERT INTO "country" VALUES ("FRA", "France", "Western Europe", "65273511", "82.5");
INSERT INTO "country" VALUES ("ESP", "Spain", "Southern Europe", "46754778", "83.4");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America", "212559417", "75.9");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "37742154", "82.3");
INSERT INTO "country" VALUES ("XXX", "NoPopLand", "Unknown Region", "0", "50.0");
INSERT INTO "country" VALUES ("AMB", "AmbiguousLand", "Sub-Saharan Africa Northern Africa", "1500000", "60.0");
INSERT INTO "countrylanguage" VALUES ("AGO", "Portuguese");
INSERT INTO "countrylanguage" VALUES ("NGA", "English");
INSERT INTO "countrylanguage" VALUES ("NGA", "Hausa");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic");
INSERT INTO "countrylanguage" VALUES ("DZA", "Arabic");
INSERT INTO "countrylanguage" VALUES ("FRA", "French");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese");
INSERT INTO "countrylanguage" VALUES ("CAN", "English");
INSERT INTO "countrylanguage" VALUES ("CAN", "French");
INSERT INTO "countrylanguage" VALUES ("XXX", "Unknown");
INSERT INTO "countrylanguage" VALUES ("AMB", "Multiple");