db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Francois Dignard <jfdign...@broadsoft.com>
Subject Re: obtaining catalog info on primary and foreign keys
Date Wed, 26 Jul 2006 18:41:52 GMT
Primary Keys are stored in the SYS.SYSKEYS table.
Foreign keys are stored in the SYS.SYSFOREIGNKEYS table.

To understand and use the data in those tables, you will need to make a 
join with CONSTRAINTID on the SYS.SYSCONSTRAINTS table CONSTRAINTID.
To know on which tables the constraints are applied, make a join on the 
SYS.SYSTABLES table with the TABLEID.

I hope this will help you get started,

JF

Fabio Porto wrote:
>
> Hello all,
>
> I’m building an application that accesses Derby catalog to build a 
> dynamic interface.
>
> I need to obtain primary key and foreign key attributes, does anyone 
> know where and how those columns
>
> get stored in the catalog?
>
> Thanks a lot,
>
> Fabio.
>


Mime
View raw message