db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fabio.po...@epfl.ch
Subject Re: obtaining catalog info on primary and foreign keys
Date Thu, 27 Jul 2006 13:52:16 GMT
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...
 Any idea??
thanks a lot,

> 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
> 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.
> >

View raw message