db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: DdlUtils example for Derby
Date Fri, 10 Mar 2006 23:59:28 GMT
On 3/11/06, Jean T. Anderson <jta@bristowhill.com> wrote:

> > * One important thing that you should note is that the model uses only
> > JDBC datatypes. This is a 'limitation' which might bite a few people,
> > espcially when the driver is old (and for instance reports OTHER
> > instead of something useful) or the database has a somewhat different
> > type concept (such as Oracle's NUMBER type).
>
> Thanks -- how "old" creates a problem?

This depends on the DB. E.g. a pre-3 MySql driver will produce *bad*
results as would any Microsoft SqlServer driver except the recently
released 2005 one. Same for pre-8 Oracle drivers.
With most databases, you can use the newest driver available, even if
not directly associated to your DB version. E.g. the 10g driver will
work just nicely with an Oracle 8 database.

> > * Instead of using ";create=true" you could use the createDatabase
> > subtask (with failOnError=false) which has the advantage that it hides
> > the DB-specific details of creation.
>
> ok, I'll try that.  When I initially used the createDatabase subtask I
> got an error, but I was fumbling quite a bit and assumed it wasn't
> supported for Derby. I'll try again.

Creation is supported, but not dropping (there is no drop=true).

> > * The database name (when writing a schema to XML) is derived from the
> > schema name in the db. If there is none (as for Derby), currently null
> > is used (which is not written to XML). I'll fix that tomorrow :-)
>
> So DdlUtils will automatically fill in that name in the schema file?
> i.e., I manually added it:
>
>    <database name="MigrateTest">

For Oracle this already works because it returns the schema name in
the JDBC metadata. For other databases I will simply add an attribute
to the task or use a default string.

cheers,
Tom

Mime
View raw message