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),
"Population" INT,
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,
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);





INSERT INTO "city" VALUES ("1", "Oranjestad", "30000");
INSERT INTO "city" VALUES ("2", "San Nicolas", "15000");
INSERT INTO "city" VALUES ("3", "Noord", "20000");
INSERT INTO "city" VALUES ("4", "Santa Cruz", "10000");
INSERT INTO "city" VALUES ("5", "Paradera", "8000");
INSERT INTO "city" VALUES ("6", "Amsterdam", "870000");
INSERT INTO "city" VALUES ("7", "Berlin", "3700000");
INSERT INTO "city" VALUES ("8", "Paris", "2100000");
INSERT INTO "city" VALUES ("9", "London", "8900000");
INSERT INTO "city" VALUES ("10", "Tokyo", "13900000");
INSERT INTO "country" VALUES ("ABW", "Aruba", "106000");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "17500000");
INSERT INTO "country" VALUES ("DEU", "Germany", "83000000");
INSERT INTO "country" VALUES ("FRA", "France", "67000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "67000000");
INSERT INTO "country" VALUES ("JPN", "Japan", "126000000");
INSERT INTO "country" VALUES ("USA", "United States", "330000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "38000000");
INSERT INTO "country" VALUES ("MEX", "Mexico", "128000000");
INSERT INTO "country" VALUES ("BRA", "Brazil", "215000000");
INSERT INTO "countrylanguage" VALUES ("ABW", "Dutch", "T", "6.1");
INSERT INTO "countrylanguage" VALUES ("ABW", "Papiamento", "T", "68.3");
INSERT INTO "countrylanguage" VALUES ("ABW", "Spanish", "F", "13.7");
INSERT INTO "countrylanguage" VALUES ("ABW", "English", "F", "7.1");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T", "91.8");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T", "93.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T", "98.0");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "T", "99.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T", "80.0");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "F", "13.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T", "58.7");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T", "22.0");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "T", "92.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "T", "97.0");