http://db.apache.org/derby/integrate/db_ddlutils.html
DdlUtils, a subproject of Apache DB, provides utilities for creating and working with database definition files (DDL) and for exporting and importing XML data using Ant tasks or programmatically in Java.
Among other uses, DdlUtils makes it easy to migrate from one database provider to another. This document provides a simple example of using DdlUtils to migrate a database to Derby using DdlUtils Ant tasks.
In this example, Derby is the source and target database because Derby is easily accessible and knows what the author knows, but can be used with any of the databases supported by DdlUtils. Usually there is an even simpler way to transfer the Derby database from one machine to another: just copy the Derby database files. If the source and target computers use official versions of Derby, you do not need to export / import the schema and data, even for machines with different architectures, since the files that make up the Derby database are platform independent. However, if you want to upgrade the Derby database to or from the alpha version of Derby to the official version, you must export the schema and data because Derby does not support updating the alpha database. DdlUtils facilitates this migration.
source share