Nothing to do with the subject, of course, but with the synergy in DB project.

Java Persistence and JDO have a huge synergy with DdlUtils. If you use DdlUtils as the repository of database schema, you can read the schema from a database and generate JDO or JP metadata and persistent classes from the DDU.

In the reverse direction, you can generate DDU from the JDO or JP classes and then create the schema from the DDU. The JDO project earlier looked at how to integrate DDU into the existing persistence model and concluded that it's some work but definitely no showstoppers.

All we need is resources...


On Dec 20, 2005, at 3:43 PM, Thomas Dudziak wrote:

On 12/21/05, Jean T. Anderson <jta@bristowhill.com> wrote:

Hi Jean,

I'm a committer on derby (and on the db pmc). I'm definitely interested
it using it and showing how it can be used with derby. If somebody can
point me to a simple example or to a test I could turn into an example,
that might be a good way to get me started.

The OJB-Derby sample that we did at ApacheCon already uses DdlUtils,
so just have a look at it :-)
Right now, I'm adding unit tests for DdlUtils and I'm using Derby for
that, so for a really short sample of the Ant task adapted from the
DdlUtils unit tests:

    <taskdef name="ddl2Database"
      <database driverclassname="org.apache.derby.jdbc.EmbeddedDriver"
      <fileset dir="${src.schema.dir}"

      <createdatabase failonerror="true"/>
      <writeschematodatabase alterdatabase="false"/>

The API is not really diffcult either:



Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:Craig.Russell@sun.com

P.S. A good JDO? O, Gasp!