Overview of DdlUtils

DdlUtils is a small, easy-to-use component for working with Database Definition (DDL) files.

DdlUtils is an Apache project. Use it to:
  • Generate DDL scripts from an existing database by using Ant tasks or a Java API.
  • Export and import data to/from XML from an supported database to another supported database (including SQLFire).
  • Take XML files that contain the definition of a database schema, for example, tables and columns. These files can be fed into DdlUtils through its Ant task or programmatically in order to create the corresponding database or alter it so that it corresponds to the DDL. Likewise, DdlUtils can generate a DDL file for an existing database.
Note: The instructions in this section use a version of DdlUtils that has been modified to support SQLFire and its SQL dialect. This version of DdlUtils is installed with SQLFire, and is available in the vFabric_SQLFire_10x/lib/ddlutils directory. Ensure that you use the installed version of DdlUtils, rather than the standard Apache version, when performing the instructions.

A common usage pattern with SQLFire is as a database cache in front of a relational data store. DdlUtils provides a way to export the schema definition from a relational database as a SQL script so the developer can tailor it for partitioning and replication and then import the schema into SQLFire.

DdlUtils can optionally be used to export from an external database and import the same into SQLFire.

Note: If you attempt to export and import data that includes auto-generated primary key columns, the data row import fails. SQLFire adds distributed system data into generated keys, and this precludes referencing those generated keys by subsequent imported data rows.