db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: obtaining catalog info on primary and foreign keys
Date Thu, 27 Jul 2006 13:56:38 GMT
fabio.porto@epfl.ch wrote:

> Thank you Jean for your answer.
> 
> In fact, i had found these two tables but the question is how to get
> column names that take part in PKs and FKs..
>  By querying Syskeys and Sysforeignkeys i can identify the keys associated to a
> table but they do not seem to store the information concerning the columns that
> take part on those keys. Something like a relationship between sysconglomerates
> with syscolumns would do it, but unfortunately is not provided.
> 
>  maybe i have missed something, but...

How about the JDBC metadata calls

java.sql.DatabaseMetaData.getImportedKeys
java.sql.DatabaseMetaData.getExportedKeys

Should be standard, rather than having to write code specific to a
database's system tables.

Dan.



Mime
View raw message