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),
"CountryCode" CHAR(3),
"Population" INT,
PRIMARY KEY ("ID"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);

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 "country" VALUES ("NLD", "Netherlands", "Europe", "16000000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11000000");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65000000");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "82000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000");
INSERT INTO "country" VALUES ("ESP", "Spain", "Europe", "47000000");
INSERT INTO "country" VALUES ("ITA", "Italy", "Europe", "60000000");
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", "26000000");
INSERT INTO "city" VALUES ("1", "Amsterdam", "NLD", "870000");
INSERT INTO "city" VALUES ("2", "Rotterdam", "NLD", "650000");
INSERT INTO "city" VALUES ("3", "Brussels", "BEL", "1200000");
INSERT INTO "city" VALUES ("4", "Antwerp", "BEL", "520000");
INSERT INTO "city" VALUES ("5", "Paris", "FRA", "2100000");
INSERT INTO "city" VALUES ("6", "Marseille", "FRA", "860000");
INSERT INTO "city" VALUES ("7", "Berlin", "DEU", "3700000");
INSERT INTO "city" VALUES ("8", "Munich", "DEU", "1500000");
INSERT INTO "city" VALUES ("9", "London", "GBR", "9000000");
INSERT INTO "city" VALUES ("10", "Manchester", "GBR", "550000");
INSERT INTO "city" VALUES ("11", "Madrid", "ESP", "3300000");
INSERT INTO "city" VALUES ("12", "Barcelona", "ESP", "1600000");
INSERT INTO "city" VALUES ("13", "Rome", "ITA", "2800000");
INSERT INTO "city" VALUES ("14", "Milan", "ITA", "1400000");
INSERT INTO "city" VALUES ("15", "New York", "USA", "8400000");
INSERT INTO "city" VALUES ("16", "Toronto", "CAN", "2900000");
INSERT INTO "city" VALUES ("17", "Sydney", "AUS", "5300000");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("NLD", "English", "F");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "German", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "English", "F");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T");
INSERT INTO "countrylanguage" VALUES ("FRA", "English", "F");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T");
INSERT INTO "countrylanguage" VALUES ("DEU", "English", "F");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish", "T");
INSERT INTO "countrylanguage" VALUES ("ESP", "English", "F");
INSERT INTO "countrylanguage" VALUES ("ITA", "Italian", "T");
INSERT INTO "countrylanguage" VALUES ("ITA", "English", "F");
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");