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,
"District" CHAR(20),
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,
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language"),
FOREIGN KEY ("CountryCode") REFERENCES "country"("Code")
);





INSERT INTO "city" VALUES ("1", "Ile-de-France");
INSERT INTO "city" VALUES ("2", "Quebec");
INSERT INTO "city" VALUES ("3", "California");
INSERT INTO "city" VALUES ("4", "Ontario");
INSERT INTO "city" VALUES ("5", "New South Wales");
INSERT INTO "city" VALUES ("6", "Bavaria");
INSERT INTO "city" VALUES ("7", "Scotland");
INSERT INTO "city" VALUES ("8", "Catalonia");
INSERT INTO "city" VALUES ("9", "Wales");
INSERT INTO "city" VALUES ("10", "Texas");
INSERT INTO "country" VALUES ("FRA", "France", "Europe", "67000000");
INSERT INTO "country" VALUES ("CAN", "Canada", "North America", "38000000");
INSERT INTO "country" VALUES ("USA", "United States", "North America", "331000000");
INSERT INTO "country" VALUES ("AUS", "Australia", "Oceania", "25000000");
INSERT INTO "country" VALUES ("BEL", "Belgium", "Europe", "11500000");
INSERT INTO "country" VALUES ("SUI", "Switzerland", "Europe", "8600000");
INSERT INTO "country" VALUES ("GBR", "United Kingdom", "Europe", "67000000");
INSERT INTO "country" VALUES ("LUX", "Luxembourg", "Europe", "630000");
INSERT INTO "country" VALUES ("CMR", "Cameroon", "Africa", "27000000");
INSERT INTO "country" VALUES ("NGA", "Nigeria", "Africa", "206000000");
INSERT INTO "countrylanguage" VALUES ("FRA", "French", "T", "99.0");
INSERT INTO "countrylanguage" VALUES ("FRA", "English", "F", "15.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "English", "T", "58.0");
INSERT INTO "countrylanguage" VALUES ("CAN", "French", "T", "22.0");
INSERT INTO "countrylanguage" VALUES ("USA", "English", "T", "80.0");
INSERT INTO "countrylanguage" VALUES ("USA", "French", "F", "1.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "English", "T", "97.0");
INSERT INTO "countrylanguage" VALUES ("AUS", "French", "F", "0.5");
INSERT INTO "countrylanguage" VALUES ("BEL", "French", "T", "40.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "English", "F", "10.0");
INSERT INTO "countrylanguage" VALUES ("BEL", "Dutch", "T", "60.0");
INSERT INTO "countrylanguage" VALUES ("SUI", "French", "T", "22.0");
INSERT INTO "countrylanguage" VALUES ("SUI", "English", "F", "8.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "English", "T", "98.0");
INSERT INTO "countrylanguage" VALUES ("GBR", "French", "F", "5.0");
INSERT INTO "countrylanguage" VALUES ("LUX", "French", "T", "70.0");
INSERT INTO "countrylanguage" VALUES ("LUX", "English", "T", "40.0");
INSERT INTO "countrylanguage" VALUES ("CMR", "French", "T", "80.0");
INSERT INTO "countrylanguage" VALUES ("CMR", "English", "F", "10.0");
INSERT INTO "countrylanguage" VALUES ("NGA", "English", "T", "53.0");
INSERT INTO "countrylanguage" VALUES ("NGA", "French", "F", "5.0");