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),
"CountryCode" CHAR(3),
PRIMARY KEY ("ID"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);

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

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





INSERT INTO "country" VALUES ("JPN", "Japan", "Asia");
INSERT INTO "country" VALUES ("CHN", "China", "Asia");
INSERT INTO "country" VALUES ("IND", "India", "Asia");
INSERT INTO "country" VALUES ("KOR", "South Korea", "Asia");
INSERT INTO "country" VALUES ("THA", "Thailand", "Asia");
INSERT INTO "country" VALUES ("VNM", "Vietnam", "Asia");
INSERT INTO "country" VALUES ("MYS", "Malaysia", "Asia");
INSERT INTO "country" VALUES ("IDN", "Indonesia", "Asia");
INSERT INTO "country" VALUES ("PAK", "Pakistan", "Asia");
INSERT INTO "country" VALUES ("IRN", "Iran", "Asia");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe");
INSERT INTO "country" VALUES ("FRA", "France", "Europe");
INSERT INTO "country" VALUES ("USA", "United States", "North America");
INSERT INTO "city" VALUES ("1", "Tokyo", "JPN");
INSERT INTO "city" VALUES ("2", "Beijing", "CHN");
INSERT INTO "city" VALUES ("3", "Mumbai", "IND");
INSERT INTO "city" VALUES ("4", "Seoul", "KOR");
INSERT INTO "city" VALUES ("5", "Bangkok", "THA");
INSERT INTO "city" VALUES ("6", "Ho Chi Minh City", "VNM");
INSERT INTO "city" VALUES ("7", "Kuala Lumpur", "MYS");
INSERT INTO "city" VALUES ("8", "Jakarta", "IDN");
INSERT INTO "city" VALUES ("9", "Karachi", "PAK");
INSERT INTO "city" VALUES ("10", "Tehran", "IRN");
INSERT INTO "city" VALUES ("11", "Berlin", "DEU");
INSERT INTO "city" VALUES ("12", "Paris", "FRA");
INSERT INTO "city" VALUES ("13", "New York", "USA");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese");
INSERT INTO "countrylanguage" VALUES ("CHN", "Mandarin");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi");
INSERT INTO "countrylanguage" VALUES ("IND", "English");
INSERT INTO "countrylanguage" VALUES ("KOR", "Korean");
INSERT INTO "countrylanguage" VALUES ("THA", "Thai");
INSERT INTO "countrylanguage" VALUES ("VNM", "Vietnamese");
INSERT INTO "countrylanguage" VALUES ("MYS", "Malay");
INSERT INTO "countrylanguage" VALUES ("MYS", "English");
INSERT INTO "countrylanguage" VALUES ("IDN", "Indonesian");
INSERT INTO "countrylanguage" VALUES ("PAK", "Urdu");
INSERT INTO "countrylanguage" VALUES ("PAK", "English");
INSERT INTO "countrylanguage" VALUES ("IRN", "Persian");
INSERT INTO "countrylanguage" VALUES ("DEU", "German");
INSERT INTO "countrylanguage" VALUES ("FRA", "French");
INSERT INTO "countrylanguage" VALUES ("USA", "English");
INSERT INTO "countrylanguage" VALUES ("JPN", "English");
INSERT INTO "countrylanguage" VALUES ("CHN", "English");
INSERT INTO "countrylanguage" VALUES ("KOR", "English");
INSERT INTO "countrylanguage" VALUES ("THA", "English");
INSERT INTO "countrylanguage" VALUES ("VNM", "English");
INSERT INTO "countrylanguage" VALUES ("IDN", "English");
INSERT INTO "countrylanguage" VALUES ("IRN", "English");