Re: Lots of code. How many tables.

From: --CELKO-- <joe.celko_at_northface.edu>
Date: 16 Feb 2004 13:20:37 -0800
Message-ID: <a264e7ea.0402161320.5abab11f_at_posting.google.com>


>> In our legacy system we had a dedicated table to contain almost all
codes. With an assortment of fields [sic] depending on the code type. <<

That is insane. It mixes data and metadata, it means that an error in one code could trash values another code. It forces codes into the same datatype. You have to load this whole table to use just one code, so performance suffers. The queries have to be needlessly complex. Etc. Etc.

This is the relational version of putting all your liquid chemicals into one tank.

>> A simple code could be M for male and F for female. <<

That is not the ISO sex code ..

>> Some codes have a long description, a short description, a mnemonic
and sometimes some other fields [sic] new requirements will promt for new 'attributes'. <<

Rows are not records; fields are not columns; tables are not files. There is no such thing as a "generic table" -- a table models a set; a set is made up of one and only specific kind of thing. Received on Mon Feb 16 2004 - 22:20:37 CET

Original text of this message