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),
"Continent" TEXT,
"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 "city" VALUES ("1", "Amsterdam");
INSERT INTO "city" VALUES ("2", "London");
INSERT INTO "city" VALUES ("3", "Washington D.C.");
INSERT INTO "city" VALUES ("4", "Ottawa");
INSERT INTO "city" VALUES ("5", "Canberra");
INSERT INTO "city" VALUES ("6", "Wellington");
INSERT INTO "city" VALUES ("7", "Dublin");
INSERT INTO "city" VALUES ("8", "Brussels");
INSERT INTO "city" VALUES ("9", "Paramaribo");
INSERT INTO "city" VALUES ("10", "Pretoria");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "Europe", "17000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "330000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000");
INSERT INTO "country" VALUES ("NZL", "New Zealand", "Oceania", "5000000");
INSERT INTO "country" VALUES ("IRL", "Ireland", "Europe", "5000000");
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", "59000000");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1380000000");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "83000000");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65000000");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("NLD", "English", "F");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("NZL", "English", "T");
INSERT INTO "countrylanguage" VALUES ("NZL", "Maori", "T");
INSERT INTO "countrylanguage" VALUES ("IRL", "English", "T");
INSERT INTO "countrylanguage" VALUES ("IRL", "Irish", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T");
INSERT INTO "countrylanguage" VALUES ("SUR", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("SUR", "English", "F");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "T");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "F");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T");