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

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
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 ("NLD", "Netherlands");
INSERT INTO "country" VALUES ("BEL", "Belgium");
INSERT INTO "country" VALUES ("GBR", "United Kingdom");
INSERT INTO "country" VALUES ("USA", "United States");
INSERT INTO "country" VALUES ("CAN", "Canada");
INSERT INTO "country" VALUES ("AUS", "Australia");
INSERT INTO "country" VALUES ("IND", "India");
INSERT INTO "country" VALUES ("DEU", "Germany");
INSERT INTO "country" VALUES ("FRA", "France");
INSERT INTO "country" VALUES ("ZAF", "South Africa");
INSERT INTO "city" VALUES ("1", "NLD");
INSERT INTO "city" VALUES ("2", "BEL");
INSERT INTO "city" VALUES ("3", "GBR");
INSERT INTO "city" VALUES ("4", "USA");
INSERT INTO "city" VALUES ("5", "CAN");
INSERT INTO "city" VALUES ("6", "AUS");
INSERT INTO "city" VALUES ("7", "IND");
INSERT INTO "city" VALUES ("8", "DEU");
INSERT INTO "city" VALUES ("9", "FRA");
INSERT INTO "city" VALUES ("10", "ZAF");
INSERT INTO "countrylanguage" VALUES ("NLD", "Dutch");
INSERT INTO "countrylanguage" VALUES ("NLD", "English");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch");
INSERT INTO "countrylanguage" VALUES ("BEL", "French");
INSERT INTO "countrylanguage" VALUES ("BEL", "English");
INSERT INTO "countrylanguage" VALUES ("GBR", "English");
INSERT INTO "countrylanguage" VALUES ("USA", "English");
INSERT INTO "countrylanguage" VALUES ("CAN", "English");
INSERT INTO "countrylanguage" VALUES ("CAN", "French");
INSERT INTO "countrylanguage" VALUES ("AUS", "English");
INSERT INTO "countrylanguage" VALUES ("IND", "English");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi");
INSERT INTO "countrylanguage" VALUES ("DEU", "German");
INSERT INTO "countrylanguage" VALUES ("FRA", "French");
INSERT INTO "countrylanguage" VALUES ("ZAF", "English");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Afrikaans");
INSERT INTO "countrylanguage" VALUES ("ZAF", "Dutch");