Re: OOP - a question about database access

From: Steve Haigh <steve_a_haigh_at_hotmail.com>
Date: Fri, 07 Nov 2003 15:39:45 +0000
Message-ID: <ae-dnWI2betNITaiRVn-tg_at_giganews.com>


Bob Badour wrote:

>>The above comments from Bob do not have any relation to "data management
>>issues". Why would a database be a good place to validate text from an
>>input field

 >
>
> Because managing integrity is managing data. Duh!
So you can catch a data entry error in the GUI but you would rather wait until a write to the DB fails? Of course the DB manages it's integrity, but that doesn't mean the GUI can't prevent users entering alphabetic characters in a phone number for example. Validating input is not the same as managing data.
>>, wouldn't it make everyone's life a lot easier if data were
>>validated before making a write to a DB?

>
>

> Since the dbms must enforce the integrity of the data anyway, it would not
> make any difference to anyone's life.
Rubbish. It makes a difference to the user to see his or her data validated quickly in the GUI rather than entering a form full of data and waiting for a response from the DB. Or are you suggesting an application should write to the database after every field on a form is completed? Maybe you want to validate on the DB at every keyboard event too? In a distributed system the validation in the GUI also reduces load on the DB if write attempts are prevented because the data was garbage.

>

>>I have found that business
>>rules are easier to code in a language like Java or C++ rather than
>>through the use of constraints and queries.

>
>

> You are joking, right?

No, why would I be? Received on Fri Nov 07 2003 - 16:39:45 CET

Original text of this message