Hello,

    Thanks for your kind words and the links.

  About:

> Have you seen the XML/mysql versoin:

   Yes, this is great and seems to be the "last" reader/project (of
many others) that still is maintained and might get updated.

   The CIA changed the structure of the online (live) pages in April
2015 and this project as far as I can tell can only "process" the
download archives (not the live pages) and, thus, the latest update is
from June, 2014 - the project is still waiting for a new download
archive  (formerly happened about once a year).

   About the schema:

   The project uses the "easy" and generic way for properties e.g.:

CREATE TABLE `factbook_fields` (
  `id` int(11) NOT NULL,
  `categoryid` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_bin NOT NULL,
  `description` text COLLATE utf8_bin NOT NULL,
  `rankorder` int(11) NOT NULL,
  `unit` varchar(50) COLLATE utf8_bin NOT NULL,
  `dollars` tinyint(4) NOT NULL,
  PRIMARY KEY (`version`,`id`),
)

   I prefer the "simpler" non-generic way e.g. spelling out all fields e.g.:

CREATE TABLE "facts"(
  "id"   INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  "code" varchar(255) NOT NULL,
  "name" varchar(255) NOT NULL,

  -----------------------
  -- Geography

  "area"       integer,
  "area_land"  integer,
  "area_water" integer,

  ------------------------
  -- People and Society

  "population"        integer,
  "population_growth" float,
  "birth_rate"        float,
  "death_rate"        float,
  "migration_rate"    float,

  ... )


   Again thanks for the link and comments. Always great to see (and
study) alternatives. Cheers.

Reply via email to