db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean T. Anderson" <...@bristowhill.com>
Subject Re: how to migrate mysql to derby
Date Tue, 28 Nov 2006 23:30:24 GMT
Feng Jiang wrote:
> Hi,
> 
> I want to use derby to write some testcases in memory. now, i have a mysql
> database, and dumped the schema into a script file. Here i want to execute
> this script file and create a identitcal database schema with that mysql
> database.

One option might be to use DdlUtils to create the derby schema from the
mysql database; a derby example is at
http://db.apache.org/derby/integrate/db_ddlutils.html. It shows how to
migrate between two derby databases, but it should work between any
databases that DdlUtils supports.

It uses the DdlUtils ant tasks to create the schema in the target
database from the XML files created from the source database (all
generated by DdlUtils). If you specifically want a SQL script that will
work with derby, DdlUtils has a writeSchemaSqlToFile ant task [1].

Do you want to just create the schema? Or do you also want to load data?

 -jean

[1]
http://db.apache.org/ddlutils/ant-tasks.html#Subtask%3A+writeSchemaSqlToFile

Mime
View raw message