Subject Re: [Firebird-Java] jdbc driver issue
Author Roman Rokytskyy
Hi,

> Now we are a step further. The software calls now the methods
> DatabaseMetadata md...
> md.getCatalogs()
> and md.getSchemas();
> It expects to find at least one entry for at least one of this two methods.
> In our case bought methods returns empty lists. Is this the correct behavior ?

It was my understanding of the JDBC specs when I implemented those
methods. But if you read it differently, please comment.

I had the same issue with Eclipse DTP, which expects at least one
schema. First I tried to workaround the issue by generating fake schema,
but finally was forced to create custom implementation of many parts of
DTP. The issue was that when I return in JDBC driver some fake schema
name, DTP uses it as a prefix to table names in auto-generated SQLs.
Firebird cannot parse such SQL. This issue is known to the Firebird
developers, but schema support is not planned for the next release.

If DbSchema does not prefix columns, it is possible to create a small
plugin that would be used by DbSchema users, which would return those
fake catalog/schema names. (Plugins differ by the JDBC URL, so Type 4,
Type 2 and Embedded are plugins, we have OpenOffice plugin to workaround
the nonconform behavior in autocommit, etc.)

I wonder how other databases without schema/catalogs work...

Roman