From derby-user-return-4733-apmail-db-derby-user-archive=db.apache.org@db.apache.org Wed Jul 26 18:42:58 2006 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 83360 invoked from network); 26 Jul 2006 18:42:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2006 18:42:57 -0000 Received: (qmail 31601 invoked by uid 500); 26 Jul 2006 18:42:56 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 31575 invoked by uid 500); 26 Jul 2006 18:42:56 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 31564 invoked by uid 99); 26 Jul 2006 18:42:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 11:42:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [130.94.149.229] (HELO bdsoft10.vwh.net) (130.94.149.229) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 11:42:55 -0700 Received: from [192.168.8.41] ([208.48.227.7]) (authenticated bits=0) by bdsoft10.vwh.net (8.13.6.20060614/8.12.11) with ESMTP id k6QIg3vb077797 for ; Wed, 26 Jul 2006 14:42:13 -0400 (EDT) Message-ID: <44C7B770.2050302@broadsoft.com> Date: Wed, 26 Jul 2006 14:41:52 -0400 From: Jean-Francois Dignard User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: Derby Discussion Subject: Re: obtaining catalog info on primary and foreign keys References: <00b601c6b0db$4da28220$2b4db280@epfl.ch> In-Reply-To: <00b601c6b0db$4da28220$2b4db280@epfl.ch> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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. >