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,
"Capital" 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 ("GBR", "United Kingdom", "Europe", "67000000", "2687");
INSERT INTO "country" VALUES ("IRL", "Ireland", "Europe", "5000000", "1442");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65000000", "2974");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "83000000", "3068");
INSERT INTO "country" VALUES ("ESP", "Spain", "Europe", "47000000", "653");
INSERT INTO "country" VALUES ("ITA", "Italy", "Europe", "59000000", "1464");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "Europe", "17000000", "2700");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11000000", "187");
INSERT INTO "country" VALUES ("CHE", "Switzerland", "Europe", "8000000", "3248");
INSERT INTO "country" VALUES ("AUT", "Austria", "Europe", "9000000", "1523");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000", "1822");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "330000000", "3813");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000", "135");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia", "126000000", "1532");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "1400000000", "1891");
INSERT INTO "city" VALUES ("2687", "London", "GBR", "8900000");
INSERT INTO "city" VALUES ("1442", "Dublin", "IRL", "550000");
INSERT INTO "city" VALUES ("2974", "Paris", "FRA", "2100000");
INSERT INTO "city" VALUES ("3068", "Berlin", "DEU", "3700000");
INSERT INTO "city" VALUES ("653", "Madrid", "ESP", "3300000");
INSERT INTO "city" VALUES ("1464", "Rome", "ITA", "2800000");
INSERT INTO "city" VALUES ("2700", "Amsterdam", "NLD", "870000");
INSERT INTO "city" VALUES ("187", "Brussels", "BEL", "1200000");
INSERT INTO "city" VALUES ("3248", "Bern", "CHE", "130000");
INSERT INTO "city" VALUES ("1523", "Vienna", "AUT", "1900000");
INSERT INTO "city" VALUES ("1822", "Ottawa", "CAN", "1000000");
INSERT INTO "city" VALUES ("3813", "Washington", "USA", "700000");
INSERT INTO "city" VALUES ("135", "Canberra", "AUS", "460000");
INSERT INTO "city" VALUES ("1532", "Tokyo", "JPN", "13900000");
INSERT INTO "city" VALUES ("1891", "Beijing", "CHN", "21500000");
INSERT INTO "city" VALUES ("2975", "Marseille", "FRA", "860000");
INSERT INTO "city" VALUES ("3069", "Munich", "DEU", "1500000");
INSERT INTO "city" VALUES ("654", "Barcelona", "ESP", "1600000");
INSERT INTO "city" VALUES ("1465", "Milan", "ITA", "1400000");
INSERT INTO "city" VALUES ("2701", "Rotterdam", "NLD", "650000");
INSERT INTO "city" VALUES ("188", "Antwerp", "BEL", "520000");
INSERT INTO "city" VALUES ("3249", "Zurich", "CHE", "430000");
INSERT INTO "city" VALUES ("1524", "Salzburg", "AUT", "150000");
INSERT INTO "city" VALUES ("2688", "Manchester", "GBR", "550000");
INSERT INTO "city" VALUES ("1443", "Cork", "IRL", "220000");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("IRL", "English", "T");
INSERT INTO "countrylanguage" VALUES ("IRL", "Irish", "T");
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 ("ESP", "Spanish", "T");
INSERT INTO "countrylanguage" VALUES ("ESP", "Catalan", "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 ("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 ("CHE", "German", "T");
INSERT INTO "countrylanguage" VALUES ("CHE", "French", "T");
INSERT INTO "countrylanguage" VALUES ("CHE", "Italian", "T");
INSERT INTO "countrylanguage" VALUES ("CHE", "English", "F");
INSERT INTO "countrylanguage" VALUES ("AUT", "German", "T");
INSERT INTO "countrylanguage" VALUES ("AUT", "English", "F");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "T");
INSERT INTO "countrylanguage" VALUES ("CHN", "Chinese", "T");