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,
"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", "38928346");
INSERT INTO "city" VALUES ("2", "40218234");
INSERT INTO "city" VALUES ("3", "1500000");
INSERT INTO "city" VALUES ("4", "500000");
INSERT INTO "city" VALUES ("5", "12000000");
INSERT INTO "country" VALUES ("AFG", "Afghanistan", "Asia", "38928346");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "331002651");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65273511");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America", "212559417");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25499884");
INSERT INTO "countrylanguage" VALUES ("AFG", "Pashto", "T");
INSERT INTO "countrylanguage" VALUES ("AFG", "Dari", "T");
INSERT INTO "countrylanguage" VALUES ("AFG", "Uzbek", "F");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T");
INSERT INTO "countrylanguage" VALUES ("USA", "Spanish", "F");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "T");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("AUS", "Mandarin", "F");