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),
"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", "Oranjestad");
INSERT INTO "city" VALUES ("2", "Amsterdam");
INSERT INTO "city" VALUES ("3", "Paris");
INSERT INTO "city" VALUES ("4", "London");
INSERT INTO "city" VALUES ("5", "Berlin");
INSERT INTO "city" VALUES ("6", "Tokyo");
INSERT INTO "city" VALUES ("7", "Beijing");
INSERT INTO "city" VALUES ("8", "Washington D.C.");
INSERT INTO "city" VALUES ("9", "Canberra");
INSERT INTO "city" VALUES ("10", "Wellington");
INSERT INTO "country" VALUES ("ABW", "Aruba", "106000");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "17000000");
INSERT INTO "country" VALUES ("FRA", "France", "65000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "67000000");
INSERT INTO "country" VALUES ("DEU", "Germany", "83000000");
INSERT INTO "country" VALUES ("JPN", "Japan", "126000000");
INSERT INTO "country" VALUES ("CHN", "China", "1400000000");
INSERT INTO "country" VALUES ("USA", "United States", "330000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "25000000");
INSERT INTO "country" VALUES ("NZL", "New Zealand", "5000000");
INSERT INTO "countrylanguage" VALUES ("ABW", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("ABW", "Papiamento", "T");
INSERT INTO "countrylanguage" VALUES ("ABW", "English", "F");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "T");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "F");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("NZL", "English", "T");
INSERT INTO "countrylanguage" VALUES ("NZL", "Maori", "T");