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





INSERT INTO "country" VALUES ("NLD", "Netherlands", "Europe", "17400000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11500000");
INSERT INTO "country" VALUES ("SUR", "Suriname", "South America", "600000");
INSERT INTO "country" VALUES ("GUY", "Guyana", "South America", "790000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "331000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Africa", "60000000");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1380000000");
INSERT INTO "country" VALUES ("SGP", "Singapore", "Asia", "5700000");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("NLD", "English", "F", "10.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T", "60.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T", "40.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "English", "F", "15.0");
INSERT INTO "countrylanguage" VALUES ("SUR", "Dutch", "T", "60.0");
INSERT INTO "countrylanguage" VALUES ("SUR", "English", "F", "5.0");
INSERT INTO "countrylanguage" VALUES ("GUY", "English", "T", "90.0");
INSERT INTO "countrylanguage" VALUES ("GUY", "Dutch", "F", "2.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T", "80.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T", "60.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T", "25.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "T", "10.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans", "T", "13.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Dutch", "F", "1.0");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "F", "12.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "English", "T", "36.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "Malay", "T", "14.0");
INSERT INTO "countrylanguage" VALUES ("SGP", "Tamil", "F", "5.0");