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,
"Region" CHAR(26),
"LifeExpectancy" FLOAT,
"GovernmentForm" CHAR(45),
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", "5000000");
INSERT INTO "city" VALUES ("2", "12000000");
INSERT INTO "city" VALUES ("3", "800000");
INSERT INTO "city" VALUES ("4", "3000000");
INSERT INTO "city" VALUES ("5", "1500000");
INSERT INTO "country" VALUES ("AAA", "Europe", "78.5", "republic");
INSERT INTO "country" VALUES ("BBB", "Asia", "72.3", "Monarchy");
INSERT INTO "country" VALUES ("CCC", "Africa", "65.0", "republic");
INSERT INTO "country" VALUES ("DDD", "Americas", "80.1", "republic");
INSERT INTO "country" VALUES ("EEE", "Oceania", "82.0", "republic");
INSERT INTO "country" VALUES ("FFF", "Europe", "75.0", "Monarchy");
INSERT INTO "country" VALUES ("GGG", "Asia", "70.0", "republic");
INSERT INTO "countrylanguage" VALUES ("AAA", "English");
INSERT INTO "countrylanguage" VALUES ("AAA", "French");
INSERT INTO "countrylanguage" VALUES ("BBB", "Mandarin");
INSERT INTO "countrylanguage" VALUES ("CCC", "Swahili");
INSERT INTO "countrylanguage" VALUES ("DDD", "English");
INSERT INTO "countrylanguage" VALUES ("EEE", "Esperanto");
INSERT INTO "countrylanguage" VALUES ("FFF", "German");
INSERT INTO "countrylanguage" VALUES ("GGG", "Hindi");
INSERT INTO "countrylanguage" VALUES ("GGG", "English");