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),
"Population" INT,
PRIMARY KEY ("ID")
);

CREATE TABLE "country" (
"Code" CHAR(3) UNIQUE,
"Name" CHAR(52),
"Population" INT,
"LifeExpectancy" FLOAT,
PRIMARY KEY ("Code")
);

CREATE TABLE "countrylanguage" (
"CountryCode" CHAR(3),
"Language" CHAR(30),
"Percentage" FLOAT,
PRIMARY KEY ("CountryCode", "Language")
);





INSERT INTO "city" VALUES ("1", "Southeast", "12300000");
INSERT INTO "city" VALUES ("2", "Northeast", "8000000");
INSERT INTO "city" VALUES ("3", "South", "6000000");
INSERT INTO "city" VALUES ("4", "North", "4000000");
INSERT INTO "city" VALUES ("5", "Central-West", "3000000");
INSERT INTO "city" VALUES ("6", "Amazonas", "2000000");
INSERT INTO "city" VALUES ("7", "Pantanal", "500000");
INSERT INTO "country" VALUES ("BRA", "Brazil", "211000000", "75.7");
INSERT INTO "country" VALUES ("ARG", "Argentina", "45000000", "76.5");
INSERT INTO "country" VALUES ("CHL", "Chile", "19000000", "80.2");
INSERT INTO "country" VALUES ("COL", "Colombia", "50000000", "77.1");
INSERT INTO "country" VALUES ("PER", "Peru", "32000000", "76.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Portuguese", "98.0");
INSERT INTO "countrylanguage" VALUES ("BRA", "Spanish", "1.5");
INSERT INTO "countrylanguage" VALUES ("BRA", "English", "0.5");