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", "London");
INSERT INTO "city" VALUES ("2", "Paris");
INSERT INTO "city" VALUES ("3", "New York");
INSERT INTO "city" VALUES ("4", "Tokyo");
INSERT INTO "city" VALUES ("5", "Berlin");
INSERT INTO "city" VALUES ("6", "Ottawa");
INSERT INTO "city" VALUES ("7", "Brussels");
INSERT INTO "city" VALUES ("8", "Geneva");
INSERT INTO "city" VALUES ("9", "Dublin");
INSERT INTO "city" VALUES ("10", "Sydney");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65000000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "330000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11500000");
INSERT INTO "country" VALUES ("CHE", "Switzerland", "Europe", "8600000");
INSERT INTO "country" VALUES ("IRL", "Ireland", "Europe", "5000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1380000000");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Africa", "59000000");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "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 ("BEL", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "German", "T");
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 ("IRL", "English", "T");
INSERT INTO "countrylanguage" VALUES ("IRL", "Irish", "T");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "F");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans", "T");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English", "T");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu", "T");
INSERT INTO "countrylanguage" VALUES ("GBR", "Welsh", "F");
INSERT INTO "countrylanguage" VALUES ("FRA", "German", "F");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "F");
INSERT INTO "countrylanguage" VALUES ("CAN", "Inuktitut", "F");
INSERT INTO "countrylanguage" VALUES ("BEL", "Luxembourgish", "F");
INSERT INTO "countrylanguage" VALUES ("CHE", "Romansh", "F");
INSERT INTO "countrylanguage" VALUES ("IRL", "Scottish Gaelic", "F");
INSERT INTO "countrylanguage" VALUES ("AUS", "Aboriginal languages", "F");
INSERT INTO "countrylanguage" VALUES ("IND", "Bengali", "F");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Xhosa", "F");