Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 23FD1475481 for ; Mon, 5 Aug 2002 09:01:04 -0400 (EDT) Received: from mail.virginia.edu (mail.Virginia.EDU [128.143.2.9]) by postgresql.org (Postfix) with SMTP id A6BF5475154 for ; Mon, 5 Aug 2002 09:00:58 -0400 (EDT) Received: from smtp.mail.virginia.edu by mail.virginia.edu id aa07441; 5 Aug 2002 9:00 EDT Received: from jlk3xpc (d-128-19-222.bootp.Virginia.EDU [128.143.19.222]) by smtp.mail.Virginia.EDU (8.9.3/8.9.3) with SMTP id JAA31198 for ; Mon, 5 Aug 2002 09:00:56 -0400 Message-ID: <006c01c23c80$345855c0$de138f80@virginia.edu> From: Jodi Kanter To: Postgres Admin List Subject: lookup tables Date: Mon, 5 Aug 2002 09:01:24 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0069_01C23C5E.ACE36010" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/15 X-Sequence-Number: 5130 This is a multi-part message in MIME format. ------=_NextPart_000_0069_01C23C5E.ACE36010 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The postgres book that I am referencing states that lookup tables do not ne= ed to be related to other tables. They exist just for use by the applicatio= n to give the user a list of choices. Wouldn't it be better to include foreign keys to their corresponding tables= ? Or to merely link them via the string value so they can be joined? Any opinions? I am working on a database that has some lookup tables that are joined by f= oreign keys and others that are just joined by the "type" field. For exampl= e, a "contact" table has a field known as "contacttype." There is a "contac= ttype" table with only one field in called "type." The "contacttype" field = in the CONTACT table and the "type" field in CONTACTTYPE table are the sam= e. They can be joined if I want to access the description information in th= e "desc" field in the CONTACTTYPE table. Please let me know if anyone sees any issues in doing it this way? Are both= methods valid and efficient ways to handle this? Thanks Jodi _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu =20 =20 =20 ------=_NextPart_000_0069_01C23C5E.ACE36010 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
The postgres book that I am referencing= states=20 that lookup tables do not need to be related to other tables. They exist ju= st=20 for use by the application to give the user a list of choices.
Wouldn't it be better to include foreig= n keys=20 to their corresponding tables? Or to merely link them via the string value = so=20 they can be joined?
Any opinions?
I am working on a database that has som= e=20 lookup tables that are joined by foreign keys and others that are just join= ed by=20 the "type" field. For example, a "contact" table has a field known as=20 "contacttype." There is a "contacttype" table with only one field in called= =20 "type." The "contacttype" field in the CONTACT table and the "type" f= ield=20 in CONTACTTYPE table are the same. They can be joined if I want to acc= ess=20 the description information in the "desc" field in the CONTACTTYPE=20 table.
Please let me know if anyone sees any i= ssues=20 in doing it this way? Are both methods valid and efficient ways to handle= =20 this?
Thanks
Jodi

_______________________________
Jodi=20 L Kanter
BioInformatics Database Administrator
University of=20 Virginia
(434) 924-2846
jkanter@virginia.edu

 

 

 

<= /DIV> ------=_NextPart_000_0069_01C23C5E.ACE36010--