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),
"Continent" TEXT,
"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 "country" VALUES ("USA", "United States", "North America", "331000000", "Federal Republic");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("MEX", "Mexico", "North America", "128000000", "Federal Republic");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "65000000", "Republic");
INSERT INTO "country" VALUES ("DEU", "Germany", "Europe", "83000000", "Federal Republic");
INSERT INTO "country" VALUES ("CHN", "China", "Asia", "1440000000", "Communist State");
INSERT INTO "country" VALUES ("IND", "India", "Asia", "1380000000", "Federal Republic");
INSERT INTO "country" VALUES ("JPN", "Japan", "Asia", "126000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("BRA", "Brazil", "South America", "212000000", "Federal Republic");
INSERT INTO "country" VALUES ("ARG", "Argentina", "South America", "45000000", "Republic");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("EGY", "Egypt", "Africa", "102000000", "Republic");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "Africa", "206000000", "Federal Republic");
INSERT INTO "country" VALUES ("ZAF", "South Africa", "Africa", "59000000", "Republic");
INSERT INTO "country" VALUES ("ESP", "Spain", "Europe", "47000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("ITA", "Italy", "Europe", "59000000", "Republic");
INSERT INTO "country" VALUES ("RUS", "Russia", "Europe", "145000000", "Federal Republic");
INSERT INTO "country" VALUES ("KOR", "South Korea", "Asia", "51000000", "Republic");
INSERT INTO "country" VALUES ("SWE", "Sweden", "Europe", "10000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("NOR", "Norway", "Europe", "5000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("DNK", "Denmark", "Europe", "5000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("FIN", "Finland", "Europe", "5000000", "Republic");
INSERT INTO "country" VALUES ("CHE", "Switzerland", "Europe", "8000000", "Federal Republic");
INSERT INTO "country" VALUES ("AUT", "Austria", "Europe", "9000000", "Federal Republic");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("NLD", "Netherlands", "Europe", "17000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("PRT", "Portugal", "Europe", "10000000", "Republic");
INSERT INTO "country" VALUES ("GRC", "Greece", "Europe", "10000000", "Republic");
INSERT INTO "country" VALUES ("POL", "Poland", "Europe", "38000000", "Republic");
INSERT INTO "country" VALUES ("CZE", "Czech Republic", "Europe", "10000000", "Republic");
INSERT INTO "country" VALUES ("HUN", "Hungary", "Europe", "9000000", "Republic");
INSERT INTO "country" VALUES ("ROU", "Romania", "Europe", "19000000", "Republic");
INSERT INTO "country" VALUES ("UKR", "Ukraine", "Europe", "43000000", "Republic");
INSERT INTO "country" VALUES ("TUR", "Turkey", "Asia", "84000000", "Republic");
INSERT INTO "country" VALUES ("SAU", "Saudi Arabia", "Asia", "35000000", "Monarchy");
INSERT INTO "country" VALUES ("IRN", "Iran", "Asia", "84000000", "Islamic Republic");
INSERT INTO "country" VALUES ("IRQ", "Iraq", "Asia", "40000000", "Parliamentary Republic");
INSERT INTO "country" VALUES ("ISR", "Israel", "Asia", "9000000", "Parliamentary Democracy");
INSERT INTO "country" VALUES ("ARE", "United Arab Emirates", "Asia", "9000000", "Federal Monarchy");
INSERT INTO "country" VALUES ("QAT", "Qatar", "Asia", "2000000", "Monarchy");
INSERT INTO "country" VALUES ("KWT", "Kuwait", "Asia", "4000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("OMN", "Oman", "Asia", "5000000", "Monarchy");
INSERT INTO "country" VALUES ("YEM", "Yemen", "Asia", "30000000", "Republic");
INSERT INTO "country" VALUES ("SYR", "Syria", "Asia", "17000000", "Republic");
INSERT INTO "country" VALUES ("LBN", "Lebanon", "Asia", "6000000", "Republic");
INSERT INTO "country" VALUES ("JOR", "Jordan", "Asia", "10000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("PAK", "Pakistan", "Asia", "220000000", "Federal Republic");
INSERT INTO "country" VALUES ("BGD", "Bangladesh", "Asia", "164000000", "Parliamentary Republic");
INSERT INTO "country" VALUES ("VNM", "Vietnam", "Asia", "97000000", "Socialist Republic");
INSERT INTO "country" VALUES ("THA", "Thailand", "Asia", "69000000", "Constitutional Monarchy");
INSERT INTO "country" VALUES ("MYS", "Malaysia", "Asia", "32000000", "Federal Constitutional Monarchy");
INSERT INTO "country" VALUES ("SGP", "Singapore", "Asia", "5000000", "Parliamentary Republic");
INSERT INTO "country" VALUES ("IDN", "Indonesia", "Asia", "273000000", "Republic");