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

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Continent" TEXT,
"Population" INT,
PRIMARY KEY ("Code")
);

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





INSERT INTO "city" VALUES ("1", "Kabul");
INSERT INTO "city" VALUES ("2", "Qandahar");
INSERT INTO "city" VALUES ("3", "Herat");
INSERT INTO "city" VALUES ("4", "Mazar-e-Sharif");
INSERT INTO "city" VALUES ("5", "Islamabad");
INSERT INTO "city" VALUES ("6", "Tehran");
INSERT INTO "city" VALUES ("7", "New Delhi");
INSERT INTO "country" VALUES ("AFG", "Afghanistan", "Asia", "40000000");
INSERT INTO "country" VALUES ("PAK", "Pakistan", "Asia", "220000000");
INSERT INTO "country" VALUES ("IRN", "Iran", "Asia", "85000000");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1400000000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "330000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000");
INSERT INTO "countrylanguage" VALUES ("AFG", "Dari", "T");
INSERT INTO "countrylanguage" VALUES ("AFG", "Pashto", "T");
INSERT INTO "countrylanguage" VALUES ("AFG", "Uzbek", "F");
INSERT INTO "countrylanguage" VALUES ("PAK", "Urdu", "T");
INSERT INTO "countrylanguage" VALUES ("PAK", "English", "F");
INSERT INTO "countrylanguage" VALUES ("IRN", "Persian", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T");
INSERT INTO "countrylanguage" VALUES ("GBR", "Welsh", "F");