lookup tables

From: Jodi Kanter <jkanter(at)virginia(dot)edu>
To: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: lookup tables
Date: 2002-08-05 13:01:24
Message-ID: 006c01c23c80$345855c0$de138f80@virginia.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

The postgres book that I am referencing states that lookup tables do not need to be related to other tables. They exist just for use by the application 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 foreign keys and others that are just joined by the "type" field. For example, a "contact" table has a field known as "contacttype." There is a "contacttype" table with only one field in called "type." The "contacttype" field in the CONTACT table and the "type" field in CONTACTTYPE table are the same. They can be joined if I want to access the description information in the "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(at)virginia(dot)edu

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Martins Zarins 2002-08-05 13:53:46 Default settings
Previous Message Martins Zarins 2002-08-05 12:42:03 Default settings