Re: Lookup Tables, the right way?

From: dawn <dawnwolthuis_at_gmail.com>
Date: 13 Mar 2006 09:56:46 -0800
Message-ID: <1142272606.337725.21330_at_z34g2000cwc.googlegroups.com>


-CELKO- wrote:
> The redundant sequence number only invites errors and wastes space.
> This is what a newbie does to fake a sequential file and it is
> non-relational.
>
> The look-up table should have the encoding at the primary key and then
> a description. After that, you might need temporal data, prior codes
> or other things.
>
> Step one is to determine if there is an industry code for the value you
> are using in your attribute. In the case of color there are a ton of
> them -- Pantone for printing, Land numbers for general industry, and
> something Earl Schieb and the automobile industry has for automobile
> finishes.
>
> There is no requirement that an encoding be character data; a lot of
> them are numeric.
>
> If there is no industry standard, then **carefully design** , not
> blindly number, an encoding. Get a copy of SQL PROGRAMMING STYLE for
> details on the kinds of encoding, scales and measurements. You might
> also want to learn why fields and columns are not anythign alike.

I agreed with everything you said, including the suggestion of your SQL PROGRAMMING STYLE book _until_ you got to the last statement. Sure, fields and columns have differences, but they do have similarities and, therefore, are SOMETHING alike. So I'm curious -- could you provide your definition (even if informal) that would show these to be so dissimilar that they are not anything alike?

>From my perspective, a column in a row in a table has a unique value at
any given point in time. A field in a record in a file has a unique value at any given point in time. Columns and fields are both used in implementation (logical) data models to model nouns from a problem space. Each is used to model properties of entities, for example. If you stick to a set of (unnecessary) rules for your fields (contraints), you can get them to behave like columns because a column _is-a_ field. Field is the superclass.

At least that is how I use those terms. Do have it wrong? Cheers! --dawn Received on Mon Mar 13 2006 - 18:56:46 CET

Original text of this message