Re: Lookup Tables, the right way?

From: Steve <stevedaniel4_at_yahoo.co.uk>
Date: 11 Mar 2006 08:53:58 -0800
Message-ID: <1142096038.271481.90730_at_e56g2000cwe.googlegroups.com>


Marshall Spight wrote:
> Jason Williams wrote:
> >
> > 1. If you are defining a database table that requires a lookup table,
> > then the foreign key between the tow tables should be an integer, and
> > the lookup table should contain two columns, a sequence number that is
> > used for the foreign keys, and the actual value. For example :
> > [...]
> > 2. If you are defining a database table that requires a lookup table,
> > then the foreign key between the two tables should be a character
> > field, and the lookup table should consist of a character field of the
> > same length. For example:
> > [...]
>

Your database would generally be bigger and slower if you store large text strings in every individual record I think.

You could also use small or single character strings as your linking fields with a longer description stored in your lookup.

Join operations, selections, updates etc will work faster on smaller strings or numeric values.

Also if you need to change one of the text values for a field if you store the texts in each individual record, you have to go through and update them all. If you store them only once, you update them only once.

S Received on Sat Mar 11 2006 - 17:53:58 CET

Original text of this message