phil swenson
phil swenson

Reputation: 8894

Converting Oracle or Sql Server DDL to Derby

We have SQL Server/Oracle DDL but I'd like to use Derby for development/automated testing purposes. I want a test env that I can sync to from source control and just run - no DB install BS.

Does anyone know a good way to convert either SQL Server or Oracle DDL to Apache Derby?

Upvotes: 1

Views: 2791

Answers (2)

user330315
user330315

Reputation:

Have a look at Liquibase.

You can define your tables (and other DB objects) in a DBMS independent XML definition. Liquibase will then take care of creating the approriate DBMS-specific DDL for you.

If you need to target different DBMS with the same definition source, this is definitely something you should look at.

Upvotes: 1

Bryan Pendleton
Bryan Pendleton

Reputation: 16359

I don't know of an automated way to do it, but it shouldn't be too hard. If it were my, I'd just submit my SQL Server or Oracle DDL to a test Derby database and start looking at the errors.

Then I'd start writing a short program in my favorite scripting language to process the DDL and change the parts that Derby is complaining about to the syntax that Derby requires.

Upvotes: 1

Related Questions