db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tyju tiui <jckdnk...@yahoo.com>
Subject Re: ddl utils schema with existing db
Date Fri, 07 Dec 2007 06:38:25 GMT
Hi Tom,

Thanks for the reply.

After scouring google feverishly I found that ddlutils is lacking a little for multiple schema

I've been working on advancing support by adding a schema attribute to the database element
and I've made some progress though it has been a little slow just trying to figure out how
it all fits together. In the end, I'd like all facets of ddlutils to be able to take advantage
of the improved schema support (at least for those db's which support multiple schemas).

I think you've got a great project here ... it's something I've been looking for for a long

I'll let you know how it turns out.



----- Original Message ----
From: Thomas Dudziak <tomdzk@gmail.com>
To: ddlutils-user@db.apache.org
Sent: Friday, December 7, 2007 1:23:10 AM
Subject: Re: ddl utils schema with existing db

On Dec 6, 2007 2:05 PM, tyju tiui <jckdnk111@yahoo.com> wrote:

> I'm confused about the difference between database and schema
 definition in ddlutils.
> If I have an existing database and would like to create a new schema
 within that database how would I go about that (via ant or
> For servers like MySQL which don't have a notion of separate schema's
 inside a single database I would have to create a new database each
 time. For servers like PostgreSQL and Oracle which do support separate
 schemas within a single database I shouldn't need to create a new db each
 time I need a new schema. Does this make sense?

DdlUtils' support for schemas within the database is weak at the
moment. You can create tables etc. within a specific schema by
prefixing the table names etc. with the schema. E.g.

<database name="test">
  <table name="testschema.test">

For databases like Oracle, you can achieve somethin similar by
accessing the database using a user corresponding to the schema. E.g.
to place something in schema 'testschema', create the schema
indirectly by creating a user of the same name, and then use this user
to connect to the database. Any tables created via an unqualified name
will then be placed in that schema.
This also works for reading the database model from a schema (using
the schema pattern to restrict which schemas to read from).


Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message