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),
"Region" CHAR(26),
"Population" INT,
PRIMARY KEY ("Code")
);

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





INSERT INTO "country" VALUES ("NLD", "Netherlands", "Europe", "17400000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "331000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11500000");
INSERT INTO "country" VALUES ("SUR", "Suriname", "South America", "600000");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Africa", "60000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1380000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000");
INSERT INTO "country" VALUES ("JAM", "Jamaica", "Caribbean", "3000000");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "67000000");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "83000000");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("SUR", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("JAM", "English", "T");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "F");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "F");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T");
INSERT INTO "city" VALUES ("1", "NLD");
INSERT INTO "city" VALUES ("2", "USA");
INSERT INTO "city" VALUES ("3", "CAN");
INSERT INTO "city" VALUES ("4", "BEL");
INSERT INTO "city" VALUES ("5", "SUR");
INSERT INTO "city" VALUES ("6", "ZAF");
INSERT INTO "city" VALUES ("7", "AUS");
INSERT INTO "city" VALUES ("8", "IND");
INSERT INTO "city" VALUES ("9", "GBR");
INSERT INTO "city" VALUES ("10", "JAM");
INSERT INTO "city" VALUES ("11", "FRA");
INSERT INTO "city" VALUES ("12", "DEU");