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,
"Population" INT,
PRIMARY KEY ("ID")
);

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Continent" TEXT,
"GovernmentForm" CHAR(45),
"Capital" INT,
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);





INSERT INTO "city" VALUES ("1", "14000000");
INSERT INTO "city" VALUES ("2", "9000000");
INSERT INTO "city" VALUES ("3", "5000000");
INSERT INTO "city" VALUES ("4", "3000000");
INSERT INTO "city" VALUES ("5", "2000000");
INSERT INTO "city" VALUES ("6", "1000000");
INSERT INTO "city" VALUES ("7", "8000000");
INSERT INTO "city" VALUES ("8", "6000000");
INSERT INTO "country" VALUES ("CHN", "Asia", "Communist State", "1");
INSERT INTO "country" VALUES ("TWN", "Asia", "Democratic Republic", "2");
INSERT INTO "country" VALUES ("SGP", "Asia", "Parliamentary Republic", "3");
INSERT INTO "country" VALUES ("MYS", "Asia", "Federal Constitutional Monarchy", "4");
INSERT INTO "country" VALUES ("USA", "North America", "Federal Republic", "5");
INSERT INTO "country" VALUES ("CAN", "North America", "Federal Parliamentary Democracy", "6");
INSERT INTO "country" VALUES ("FRA", "Europe", "Republic", "7");
INSERT INTO "country" VALUES ("ZAF", "Africa", "Republic", "8");
INSERT INTO "country" VALUES ("HKG", "Asia", "Special Administrative Region", "3");
INSERT INTO "country" VALUES ("MAC", "Asia", "Special Administrative Region", "4");
INSERT INTO "countrylanguage" VALUES ("CHN", "Chinese");
INSERT INTO "countrylanguage" VALUES ("TWN", "Chinese");
INSERT INTO "countrylanguage" VALUES ("SGP", "Chinese");
INSERT INTO "countrylanguage" VALUES ("MYS", "Chinese");
INSERT INTO "countrylanguage" VALUES ("HKG", "Chinese");
INSERT INTO "countrylanguage" VALUES ("MAC", "Chinese");
INSERT INTO "countrylanguage" VALUES ("USA", "English");
INSERT INTO "countrylanguage" VALUES ("CAN", "English");
INSERT INTO "countrylanguage" VALUES ("CAN", "French");
INSERT INTO "countrylanguage" VALUES ("FRA", "French");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English");