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





INSERT INTO "country" VALUES ("USA", "United States of America");
INSERT INTO "country" VALUES ("NLD", "Netherlands");
INSERT INTO "country" VALUES ("BEL", "Belgium");
INSERT INTO "country" VALUES ("CAN", "Canada");
INSERT INTO "country" VALUES ("SUR", "Suriname");
INSERT INTO "country" VALUES ("GBR", "United Kingdom");
INSERT INTO "country" VALUES ("ZAF", "South Africa");
INSERT INTO "country" VALUES ("AUS", "Australia");
INSERT INTO "country" VALUES ("NZL", "New Zealand");
INSERT INTO "country" VALUES ("GUY", "Guyana");
INSERT INTO "country" VALUES ("FRA", "France");
INSERT INTO "country" VALUES ("DEU", "Germany");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "82.1");
INSERT INTO "countrylanguage" VALUES ("USA", "Dutch", "0.1");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "95.0");
INSERT INTO "countrylanguage" VALUES ("NLD", "English", "10.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "60.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "English", "6.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "58.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "Dutch", "0.2");
INSERT INTO "countrylanguage" VALUES ("SUR", "Dutch", "60.0");
INSERT INTO "countrylanguage" VALUES ("SUR", "English", "5.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "98.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "Dutch", "0.1");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "9.6");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Dutch", "0.5");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "97.0");
INSERT INTO "countrylanguage" VALUES ("NZL", "English", "96.0");
INSERT INTO "countrylanguage" VALUES ("GUY", "English", "90.0");
INSERT INTO "countrylanguage" VALUES ("GUY", "Dutch", "0.5");
INSERT INTO "countrylanguage" VALUES ("FRA", "English", "5.0");
INSERT INTO "countrylanguage" VALUES ("DEU", "English", "56.0");
INSERT INTO "city" VALUES ("1", "USA");
INSERT INTO "city" VALUES ("2", "NLD");
INSERT INTO "city" VALUES ("3", "BEL");
INSERT INTO "city" VALUES ("4", "CAN");
INSERT INTO "city" VALUES ("5", "SUR");
INSERT INTO "city" VALUES ("6", "GBR");
INSERT INTO "city" VALUES ("7", "ZAF");
INSERT INTO "city" VALUES ("8", "AUS");
INSERT INTO "city" VALUES ("9", "NZL");
INSERT INTO "city" VALUES ("10", "GUY");
INSERT INTO "city" VALUES ("11", "FRA");
INSERT INTO "city" VALUES ("12", "DEU");