>>> On 6/19/2008 at 4:45 PM, in message
<6e017577-eb1d-49a5-886a-8c4ffaaaba5a@[EMAIL PROTECTED]
>,
--CELKO--<jcelko212@[EMAIL PROTECTED]
> wrote:
> I have an article on this topic you can cut & paste for your guy:
>
> http://www.dbazine.com/ofinterest/oi-articles/celko22
Interesting. I will pass it on.
I have to be honest, though, that some of your reasons against it seem
spurious. For instance, the concern about someone adding a code_value
that
is a lot of whitespace terminated by a single space. Unless you are using
a
CHAR(1) field this is always a possibility. I'm not sure what the maximum
length of the field has to do with how likely the occurance would be.
Maybe
you have some sort of statistics on this? :-)
Also, the whole VARCHAR(x) where x is a 'large number'. Does it take more
space to put a value of 'X' in a VARCHAR(255) column than it does to put
'X'
in a VARCHAR(40) column? Perhaps it does, and if so that's a good reason
to
be against it. But if it doesn't take up more space I'm not sure I see
the
reason to prefer the smaller max length to the larger one. I'm not
honestly
suggesting that everything be VARCHAR(20000) or whatever the max is, if
you
know you'll never come close to having a column that would take up that
much
space, but if you aren't sure of the maximum possible length of something
then why not make it something fairly large?
One reason I *didn't* see in your article is the use of the OTLT as a
parent
table for foreign key constraints. Certainly it seems better to say:
Alter Table a_table
Add Constraint a_table_fk1
Foreign Key (state_code)
References state_codes (state_code)
Enforced
Than it would be to put in a CHECK constraint against values on an OTLT.
To
me this seems the best argument against it.
Frank


|