Subject RE: [Firebird-Java] Re: JDBC connection and multiple schemas
Author Alexandr Molochnikov
Roman,

Thank you very much for the detailed answer. I suspected that Firebird
has no schemas, but needed a confirmation.

I was somewhat intrigued (and confused) by the InterBase Language
Reference manual downloadable from Sourceforge, where the CONNECT
statement is described as attaching "to one or more databases", which
seemed to imply that multiple databases can be used within the same
connection - something akin schemas.

Regards,

Alex.

-----Original Message-----
From: rrokytskyy [mailto:rrokytskyy@...]
Sent: Thursday, June 17, 2004 4:37 PM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: JDBC connection and multiple schemas


> I've just started playing with Firebird 1.5, and already run into
> something I cannot comprehend. It appears to me that in Firebird a
> JDBC connection is associated with schema, which is made part of the
> URL (actually, the URL requires the name of the physical file, but
> since there is a one-to-one correspondence between schema and file,
> one can say that the association is done at the schema level).

There is no schemas in Firebird. There's no one-to-one relation between
schema and file because there is no schema. A file is a complete
database, but there is no schema in the database, i.e. any logged in
user sees unqualified database objects.

> If this is so, how can one run a SELECT against tables that belong
> to different schemas? Normally, one would qualify the table names
> with their schemas, but in Firebird a given connection will know
> only its own schema, so would this even be possible?

Again, there is no schemas. :) And there is no possibility to issue
queries over over multiple databases.

> Any clues, as well as pointers to a good on-line info will be
> appreciated. (I looked at the docs available from Sourceforge, but the

> issue of qualified table names is ignored there. A sign of feature not

> supported?)

Correct, schemas are not supported.

> PS: I tried DatabaseMetaData.getSchemas() method, but the returned
> ResultSet is empty. Another proof that there is no such thing as
> "schema" in Firebird?

Right. See DatabaseMetaData.supportsSchemasXXXX() methods.

Best regards,
Roman Rokytskyy





Yahoo! Groups Links