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

CREATE TABLE "country" (
"Code" CHAR(3),
"Continent" TEXT,
"LifeExpectancy" FLOAT,
"GovernmentForm" CHAR(45),
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language")
);





INSERT INTO "city" VALUES ("1", "Lagos", "14000000");
INSERT INTO "city" VALUES ("2", "Cairo", "9500000");
INSERT INTO "city" VALUES ("3", "Nairobi", "4500000");
INSERT INTO "city" VALUES ("4", "Cape Town", "4300000");
INSERT INTO "city" VALUES ("5", "Accra", "2300000");
INSERT INTO "city" VALUES ("6", "Algiers", "3500000");
INSERT INTO "city" VALUES ("7", "Kampala", "1600000");
INSERT INTO "city" VALUES ("8", "Addis Ababa", "3000000");
INSERT INTO "city" VALUES ("9", "Dakar", "1200000");
INSERT INTO "city" VALUES ("10", "Tunis", "1100000");
INSERT INTO "country" VALUES ("NGA", "Africa", "54.3", "Federal Republic");
INSERT INTO "country" VALUES ("EGY", "Africa", "72.7", "Republic");
INSERT INTO "country" VALUES ("KEN", "Africa", "66.8", "Republic");
INSERT INTO "country" VALUES ("ZAF", "Africa", "63.9", "Parliamentary Republic");
INSERT INTO "country" VALUES ("GHA", "Africa", "61.0", "Republic");
INSERT INTO "country" VALUES ("DZA", "Africa", "76.9", "Republic");
INSERT INTO "country" VALUES ("UGA", "Africa", "59.1", "Republic");
INSERT INTO "country" VALUES ("ETH", "Africa", "65.0", "Federal Democratic Republic");
INSERT INTO "country" VALUES ("SEN", "Africa", "67.2", "Republic");
INSERT INTO "country" VALUES ("TUN", "Africa", "75.4", "Republic");
INSERT INTO "countrylanguage" VALUES ("NGA", "English", "53.0");
INSERT INTO "countrylanguage" VALUES ("EGY", "Arabic", "90.0");
INSERT INTO "countrylanguage" VALUES ("KEN", "Swahili", "68.0");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Zulu", "22.0");
INSERT INTO "countrylanguage" VALUES ("GHA", "English", "80.0");
INSERT INTO "countrylanguage" VALUES ("DZA", "Arabic", "75.0");
INSERT INTO "countrylanguage" VALUES ("UGA", "English", "60.0");
INSERT INTO "countrylanguage" VALUES ("ETH", "Amharic", "32.0");
INSERT INTO "countrylanguage" VALUES ("SEN", "French", "60.0");
INSERT INTO "countrylanguage" VALUES ("TUN", "Arabic", "98.0");