SourceForge.net Logo
Navigation

Users

View ChangeLog
Submit a bug report

Developers

Project Home
Submit a patch

wfb2sql

wfb2sql is a Perl script that extracts information from the CIA World Factbook and creates SQL statements for IBM DB/2, PostgreSQL or MySQL. This data builds a perfect database for learning and teaching SQL.

News

07/20/2003: wfb2sql is now being hosted on SourceForge.net.
05/23/2003: Version 0.3 released. Several bugfixes.

Features

wfb2sql is able to create SQL-statements for the following databases:

  • IBM DB/2
  • MySQL
  • PostgreSQL

The following information can be extracted from the "CIA World Factbook":

  • Country information (name, background, capital, area, coastline)
  • Population information (birth rate, death rate, age structure, labour force, population, population growth)
  • Communication data (number of mainlines in use, cellphones, internet users, internet service providers)
  • Dependent countries
  • Organization memberships
  • Border countries
  • Maps and small or large flag images (as BLOBs)

More features:

  • Outputs schema data and/or INSERT-statements
  • All options can be set via a configuration file or command line switches

Download

wfb2sql (19 kB)
You also need the CIA World Factbook.

Requirements

Perl 5.004 or higher, Getopt::Long, Pod::Usage, Options::General
Getopt::Long is availiable at http://search.cpan.org/author/JV/Getopt-Long-2.33/
Pod::Usage is availiable at http://search.cpan.org/author/MAREKR/PodParser-1.21/
Options::General is available at http://search.cpan.org/author/SIMON/Config-Auto-0.03/

Documentation

The man page is also available as HTML. Information on the latest changes are available in the ChangeLog.

The CIA World Factbook

The Factbook is available for free at http://www.cia.gov/cia/publications/factbook/. Extract from the Copyright-Statement: "The Factbook is in the public domain. Accordingly, it may be copied freely without permission of the Central Intelligence Agency (CIA).". The complete .zip-archive has as size of approx. 85 MB. Since wfb2sql doesn't need the included PDF-maps, you may also decide to download the smaller version without the PDF-maps. This download is about 15 MB.

License

wfb2sql has been published under the GNU General Public License.

wfb2sql, Copyright © 2003 University of Tübingen, Arbeitsbereich Datenbanken und Informationssysteme. All rights reserved.