You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Daniel Toffetti <dt...@yahoo.com.ar> on 2010/03/26 01:18:05 UTC

Terms for "catalog" and "schema"

Hi all,

    OK, I'm trying to load a Schema from the database to generate entity
classes later. Now, I will provide a GUI to let the user choose the server
connection, catalog, schema and tables to process.
    So I want to provide three combos, one for connection, one for catalog
and one for schema, and also a list for tables. I have this same setup
working with Schemacrawler library.

    This is my code so far:

        private JDBCConfigurationImpl jdbcConf = new
JDBCConfigurationImpl();
        private SchemaGenerator schemaGenerator = null;

       
jdbcConf.setConnectionDriverName(databaseConnection.getDriverClass());
        jdbcConf.setConnectionURL(databaseConnection.getDatabaseURL());
        jdbcConf.setConnectionUserName(databaseConnection.getUser());
        jdbcConf.setConnectionPassword(databaseConnection.getPassword());
        schemaGenerator = new SchemaGenerator(jdbcConf);

    Now, I see how to get the schemas, but cannot find how to get the
catalogs:

        schemaGenerator.getSchemaGroup().getSchemas()

    Is there any other term for "catalog" in OpenJPA parlance ??  Am I
missing something ??

Thanks in advance,

Daniel

-- 
View this message in context: http://n2.nabble.com/Terms-for-catalog-and-schema-tp4801224p4801224.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Terms for "catalog" and "schema"

Posted by Jeremy Bauer <te...@gmail.com>.
Hi Daniel,

The various database vendors and JDBC drivers have different usage of
catalogs, some not using them at all or treating them the same as a schema.
While many JPA mapping constructs allow you to specify a catalog attribute,
I've found that OpenJPA uses the default catalog.  There is a JIRA[1] filed
to enhance the catalog support at some point, but there hasn't been much/any
call for it.  If you have specific scenarios you'd like to see supported,
please document them in the JIRA or post them and I'll get them added to the
JIRA.  That'll help ensure those scenarios get tested if/when the support is
added.

-Jeremy

[1] https://issues.apache.org/jira/browse/OPENJPA-840

On Thu, Mar 25, 2010 at 7:52 PM, Daniel Toffetti <dt...@yahoo.com.ar>wrote:

>
>    Now that I think again, the "catalog" is the specific database I'm
> connecting to... I've been surprised before by the fact that I could get a
> list of catalogs even when I'm connecting to one specific database, but
> anyway with Schemacrawler and with plain JDBC I could get it.
>    Perhaps this will be of interest later if I need to support multiple
> database products, but right now I can get the list of tables I'm
> interested
> in.
>    Thanks in advance for any comments,
>
> Best,
>
> Daniel
>
>
> Daniel Toffetti wrote:
> >
> >
> >     Is there any other term for "catalog" in OpenJPA parlance ??  Am I
> > missing something ??
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Terms-for-catalog-and-schema-tp4801224p4801363.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Re: Terms for "catalog" and "schema"

Posted by Daniel Toffetti <dt...@yahoo.com.ar>.
    Now that I think again, the "catalog" is the specific database I'm
connecting to... I've been surprised before by the fact that I could get a
list of catalogs even when I'm connecting to one specific database, but
anyway with Schemacrawler and with plain JDBC I could get it.
    Perhaps this will be of interest later if I need to support multiple
database products, but right now I can get the list of tables I'm interested
in.
    Thanks in advance for any comments,

Best,

Daniel


Daniel Toffetti wrote:
> 
> 
>     Is there any other term for "catalog" in OpenJPA parlance ??  Am I
> missing something ??
> 
> 

-- 
View this message in context: http://n2.nabble.com/Terms-for-catalog-and-schema-tp4801224p4801363.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.