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", "Rotterdam", "650000");
INSERT INTO "city" VALUES ("8", "The Hague", "540000");
INSERT INTO "city" VALUES ("9", "Berlin", "3700000");
INSERT INTO "city" VALUES ("10", "Paris", "2100000");
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 ("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 "country" VALUES ("ARG", "Argentina", "45000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "67000000");
INSERT INTO "countrylanguage" VALUES ("ABW", "Papiamento", "T", "70.0");
INSERT INTO "countrylanguage" VALUES ("ABW", "Dutch", "T", "10.0");
INSERT INTO "countrylanguage" VALUES ("ABW", "Spanish", "F", "15.0");
INSERT INTO "countrylanguage" VALUES ("ABW", "English", "F", "5.0");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("NLD", "English", "F", "5.0");
INSERT INTO "countrylanguage" VALUES ("DEU", "German", "T", "90.0");
INSERT INTO "countrylanguage" VALUES ("DEU", "English", "F", "10.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T", "98.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "English", "F", "2.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T", "80.0");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "F", "15.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T", "60.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T", "20.0");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "T", "95.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "T", "98.0");
INSERT INTO "countrylanguage" VALUES ("ARG", "Spanish", "T", "97.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T", "99.0");