From: Jodi Kanter <jkanter@virginia.edu>
To: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: lookup tables
Date: Mon, 5 Aug 2002 09:01:24 -0400
Message-ID: <006c01c23c80$345855c0$de138f80@virginia.edu> (raw)
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@virginia.edu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jkanter@virginia.edu
Subject: Re: lookup tables
In-Reply-To: <006c01c23c80$345855c0$de138f80@virginia.edu>
References: <006c01c23c80$345855c0$de138f80@virginia.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox