You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Kevin Williams <ke...@qwest.net> on 2006/11/29 21:19:46 UTC

[RDB DAS] Support for database schema categorization

Currently the DAS does nothing explicit in support of database schema 
designations on tables; generated writes do not include schema 
designations. I believe this is fine 80% of the time since – as far as I 
can tell – schemas are not usually “mixed” within an application.

The most frequent use of these designations seems to be to categorize 
equivalent tables into separate “spaces”. So, within a single database 
you might have test, development and production schemas. For example, 
the database could have the following identical tables:

test.customer

development.customer

production.customer

An application can switch between them by switching the default schema.

However, I have also heard of applications using schema names to 
categorize in a different way in which the app will mix tables from 
different schemas. So there might be something like:

base.customer

extensions.customer_ext

To support this usage, I think the DAS must include schema names in the 
generated write statements.

So, the issue is where the DAS should get the schema names. JDBC 
ResultSetMetadata provides a method to get the schema name but some 
vendors do not fully support the Interface. The DAS config file is 
another possibility and the current config model could be expanded to 
include an optional schema name associated with a table.

Maybe the best approach would be to leave the default behavior as it is: 
the DAS does not deal with schema names. But, if users include schema 
name information in the config then the DAS will generate write 
statements using the provided schema name.

Any thoughts?

I have opened TUSCANY-952 to track this.

--
Kevin



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [RDB DAS] Support for database schema categorization

Posted by Brent Daniel <br...@gmail.com>.
Kevin,

  I agree that mixed schema support is something we should provide.
The changes required would actually be quite pervasive as, up to now,
we have assumed that data is coming from a single schema.  For
example, a Table with a particular name would no longer necesarily be
unique in a Config instance. This would require us to change code
wherever we are looking up a Table (this should be localized to our
ConfigWrapper for the most part, but probably happens elsewhere.)

  I'll look into this some more, but, I agree, the best solution is
probably to add a schema name attribute to the config.

Brent

On 11/29/06, Kevin Williams <ke...@qwest.net> wrote:
> Currently the DAS does nothing explicit in support of database schema
> designations on tables; generated writes do not include schema
> designations. I believe this is fine 80% of the time since – as far as I
> can tell – schemas are not usually "mixed" within an application.
>
> The most frequent use of these designations seems to be to categorize
> equivalent tables into separate "spaces". So, within a single database
> you might have test, development and production schemas. For example,
> the database could have the following identical tables:
>
> test.customer
>
> development.customer
>
> production.customer
>
> An application can switch between them by switching the default schema.
>
> However, I have also heard of applications using schema names to
> categorize in a different way in which the app will mix tables from
> different schemas. So there might be something like:
>
> base.customer
>
> extensions.customer_ext
>
> To support this usage, I think the DAS must include schema names in the
> generated write statements.
>
> So, the issue is where the DAS should get the schema names. JDBC
> ResultSetMetadata provides a method to get the schema name but some
> vendors do not fully support the Interface. The DAS config file is
> another possibility and the current config model could be expanded to
> include an optional schema name associated with a table.
>
> Maybe the best approach would be to leave the default behavior as it is:
> the DAS does not deal with schema names. But, if users include schema
> name information in the config then the DAS will generate write
> statements using the provided schema name.
>
> Any thoughts?
>
> I have opened TUSCANY-952 to track this.
>
> --
> Kevin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org