Return to main dbmstools documentation page.


This section lists the prerequisites for using the different tools in the dbmstools package. Note that pretty much all the requirements are available as open source, although some options (such as Java, or an Oracle JDBC driver) are just free.

General Script Use

For using the general tools (xml2ddl, xml2doc, deltaddl, filterdml), all you need is Python. Python is available for more platforms than I care to think of.

dbmstools will (or at least should) work with any Python version from 2.2 on up, but I recommend using the latest version available (2.5.x at the time of writing).

Alternatively, you can run any of the tools with Jython (an implementation of a Python runtime that operates within a Java Virtual Machine). See this page for details on using the wrapper script to run any dbmstools script in Jython. Note that a stripped-down version of Jython is provided with dbmstools. To run scripts under Jython, all you need is Java (version 1.4+, but versions 1.5 or 1.6 recommended).

db2sql, db2xml, dbclear and dbdrop

These tools require use of Jython, since they use Java's JDBC API. This means that you'll need to have Java installed. You'll also need a JDBC driver for your DBMS. See this page for complete details on how to do this.

Generating Diagrams with xml2doc

xml2doc is able to generate basic schema diagrams (entity-relationship style), which it can then embed in the generated HTML documentation. The diagrams make quite a difference to how useful and readable the documentation is, so I recommend using them.

To generate diagrams, you need to install a tool called dot from A T & T's wonderful graphviz package. Once you've installed graphviz, you just need to ensure that it's available in your PATH when you run xml2doc (or the associated ant wrapper).

Installing dbmstools

Installing dbmstools is pretty easy - you unzip it and there you are.

The directory structure looks like this:

docs:Contains HTML and text versions of the documentation. The text version uses ReStructured Text, from which the HTML is generated
jdbc-drivers:A directory in which you place (or link) any JDBC drivers for the DBMSs you use
lib:Contains a stripped-down version of Jython 2.2.1, which also includes the Jython Ant task and all the dbmstools scripts
main:Contains all the main tools
samples:Contains a sample XML schema file, and a sample ant build file

If you get the source distribution, it includes the following:

bin:Contains scripts to help build the distribution
src:Source for the Jython ant task
test:Unit and system tests for the various tools. These make a few assumptions about the source environment.