Re: DB clasical structure violation

From: Anthony W. Youngman <thewolery_at_nospam.demon.co.uk>
Date: Tue, 9 Jul 2002 00:04:21 +0100
Message-ID: <i61flYA1phK9Ewqz_at_thewolery.demon.co.uk>


In article <Oj8W8.1887$Xx3.206796058_at_newssvr14.news.prodigy.com>, Jerason Banes <jbanes_at_techie.com> writes
>> And I would agree with you only too strongly about people deciding "oh
>> we'll put the user's social security number in the name field". *BUT*
>> how would *you* stop this in SQL? You've just declared "name" to be a
>> text field. How do you stop the user putting any old crap in there? otoh
>> you *can* stop users putting text into numeric fields like price, for
>> example. Been there, done that, sworn blue murder at the silly idiot
>> who's caused 10 times more problems than he's solved.
>
>Isn't this what God created CHECK constraints for? On a good enterprise
>database, you should be able to combine a constraint and stored procedure to
>check just about anything.
>
Well, you can do the same thing in Pick, too (I presume CHECK is a SQL thing?)

But if you declare a free text field for surname, how do you know that what they put in is a *name* and not a *description*. Okay, you can ban numerics from the name field, but a computer can only ever enforce syntax. It doesn't have a clue about semantics.

Cheers,
Wol

-- 
Anthony W. Youngman - wol at thewolery dot demon dot co dot uk
Witches are curious by definition and inquisitive by nature. She moved in. "Let 
me through. I'm a nosey person.", she said, employing both elbows.
Maskerade : (c) 1995 Terry Pratchett
Received on Tue Jul 09 2002 - 01:04:21 CEST

Original text of this message