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,
"HeadOfState" CHAR(60),
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", "The Hague");
INSERT INTO "city" VALUES ("3", "Utrecht");
INSERT INTO "city" VALUES ("4", "Rotterdam");
INSERT INTO "city" VALUES ("5", "Berlin");
INSERT INTO "city" VALUES ("6", "Paris");
INSERT INTO "city" VALUES ("7", "London");
INSERT INTO "city" VALUES ("8", "Brussels");
INSERT INTO "city" VALUES ("9", "Madrid");
INSERT INTO "city" VALUES ("10", "Rome");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "16000000", "Beatrix");
INSERT INTO "country" VALUES ("BEL", "Belgium", "11000000", "Albert II");
INSERT INTO "country" VALUES ("DEU", "Germany", "82000000", "Joachim Gauck");
INSERT INTO "country" VALUES ("FRA", "France", "65000000", "François Hollande");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "63000000", "Elizabeth II");
INSERT INTO "country" VALUES ("ESP", "Spain", "47000000", "Juan Carlos I");
INSERT INTO "country" VALUES ("ITA", "Italy", "60000000", "Giorgio Napolitano");
INSERT INTO "country" VALUES ("LUX", "Luxembourg", "500000", "Henri");
INSERT INTO "country" VALUES ("AUT", "Austria", "8000000", "Heinz Fischer");
INSERT INTO "country" VALUES ("CHE", "Switzerland", "8000000", "Didier Burkhalter");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("NLD", "Frisian", "F");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T");
INSERT INTO "countrylanguage" VALUES ("BEL", "German", "F");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("ESP", "Spanish", "T");
INSERT INTO "countrylanguage" VALUES ("ESP", "Catalan", "F");
INSERT INTO "countrylanguage" VALUES ("ITA", "Italian", "T");
INSERT INTO "countrylanguage" VALUES ("LUX", "Luxembourgish", "T");
INSERT INTO "countrylanguage" VALUES ("LUX", "French", "F");
INSERT INTO "countrylanguage" VALUES ("AUT", "German", "T");
INSERT INTO "countrylanguage" VALUES ("CHE", "German", "T");
INSERT INTO "countrylanguage" VALUES ("CHE", "French", "T");
INSERT INTO "countrylanguage" VALUES ("CHE", "Italian", "T");