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,
"IndepYear" INT,
"Population" INT,
"GovernmentForm" CHAR(45),
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", "5000000");
INSERT INTO "city" VALUES ("2", "12000000");
INSERT INTO "city" VALUES ("3", "800000");
INSERT INTO "city" VALUES ("4", "3000000");
INSERT INTO "city" VALUES ("5", "15000000");
INSERT INTO "city" VALUES ("6", "4500000");
INSERT INTO "city" VALUES ("7", "700000");
INSERT INTO "city" VALUES ("8", "2000000");
INSERT INTO "country" VALUES ("USA", "1776", "331000000", "Federal Republic");
INSERT INTO "country" VALUES ("FRA", "1792", "67000000", "Republic");
INSERT INTO "country" VALUES ("GER", "1871", "83000000", "Federal Republic");
INSERT INTO "country" VALUES ("ITA", "1861", "60000000", "Republic");
INSERT INTO "country" VALUES ("CAN", "1867", "38000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("BRA", "1822", "210000000", "Federal Republic");
INSERT INTO "country" VALUES ("AUS", "1901", "25000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("IND", "1947", "1380000000", "Federal Republic");
INSERT INTO "country" VALUES ("JPN", "660", "126000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("MEX", "1810", "128000000", "Federal Republic");
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 ("FRA", "Breton", "F");
INSERT INTO "countrylanguage" VALUES ("GER", "German", "T");
INSERT INTO "countrylanguage" VALUES ("GER", "Sorbian", "F");
INSERT INTO "countrylanguage" VALUES ("ITA", "Italian", "T");
INSERT INTO "countrylanguage" VALUES ("ITA", "German", "F");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "T");
INSERT INTO "countrylanguage" VALUES ("BRA", "Spanish", "F");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "Hindi", "T");
INSERT INTO "countrylanguage" VALUES ("IND", "English", "F");
INSERT INTO "countrylanguage" VALUES ("JPN", "Japanese", "T");
INSERT INTO "countrylanguage" VALUES ("MEX", "Spanish", "T");
INSERT INTO "countrylanguage" VALUES ("MEX", "Nahuatl", "F");