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

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),
"IsOfficial" TEXT,
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);





INSERT INTO "city" VALUES ("1", "Amsterdam");
INSERT INTO "city" VALUES ("2", "London");
INSERT INTO "city" VALUES ("3", "New York");
INSERT INTO "city" VALUES ("4", "Sydney");
INSERT INTO "city" VALUES ("5", "Brussels");
INSERT INTO "city" VALUES ("6", "Paris");
INSERT INTO "city" VALUES ("7", "Berlin");
INSERT INTO "city" VALUES ("8", "Tokyo");
INSERT INTO "city" VALUES ("9", "Beijing");
INSERT INTO "city" VALUES ("10", "Cairo");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "Western Europe", "17000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Western Europe", "67000000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "330000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Western Europe", "11500000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000");
INSERT INTO "country" VALUES ("IND", "India", "Southern and Central Asia", "1380000000");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Southern Africa", "59000000");
INSERT INTO "country" VALUES ("DEU", "Germany", "Western Europe", "83000000");
INSERT INTO "country" VALUES ("FRA", "France", "Western Europe", "65000000");
INSERT INTO "country" VALUES ("JPN", "Japan", "Eastern Asia", "126000000");
INSERT INTO "country" VALUES ("CHN", "China", "Eastern Asia", "1440000000");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Northern Africa", "102000000");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("NLD", "English", "F", "5.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T", "98.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T", "90.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T", "90.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T", "60.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T", "40.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T", "60.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T", "20.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "T", "10.0");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "T", "40.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "T", "9.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans", "T", "13.0");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T", "90.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "T", "99.0");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "T", "90.0");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "T", "99.0");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "F", "10.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "Mandarin", "F", "2.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "Welsh", "F", "1.0");