Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Where to do Data Validation?

Re: Where to do Data Validation?

From: Brian Tkatch <N/A>
Date: Tue, 20 Nov 2007 11:12:17 -0500
Message-ID: <gl16k3t536vahko84n12cf4g1k4qaqr4si@4ax.com>


On Tue, 20 Nov 2007 07:49:28 -0800 (PST), "fitzjarrell_at_cox.net" <fitzjarrell_at_cox.net> wrote:

>Comments embedded.
>On Nov 20, 8:09 am, Brian Tkatch <N/A> wrote:
>> On Mon, 19 Nov 2007 09:48:12 -0800 (PST), Vijai Kalyan
>>
>> <vijai.kal..._at_gmail.com> wrote:
>> >Hi All,
>>
>> >I have a question about data validation. I have been reading some
>> >articles that indicate that data validation should be done at the
>> >application level (while also having integrity constraints in the
>> >database) whereas other articles mention that data validation should
>> >be done only at the database level because that's what integrity
>> >constraints are for.
>>
>> >Any for or against on these two viewpoints?
>>
>> >Thanks,
>>
>> >Vijai.
>>
>> If the database is just a convenient oplace to store data, and the
>> program is what matters, put the validation in the program.
>>
>
>And if this conveniently stored data is 'hosed' how will the
>application function? By not validating in BOTH places regardless one
>runs the risk of application failure and lost work.

If the database is just a convenient place to store data, it is the equivalent of having a flat file with speedy querying. What protection is there against a flat file? Probably backups. Same here.

>> If the program is just a convenient way to work with the data, and the
>> database is what matters, put the validation in the database.
>
>And, yet, why should the users be subjected to what can be 'terse' and
>'cryptic' error messages from Oracle when the application can, and
>should, validate the input data for proper format? Validation should
>occur here, too, regardless.

Methinks you have never seen error messages before. Most of the time the application is even more cryptic!

>The answer to the question, then, is validate in both, and there is no
>conditional response to that. Failure to do so is carelessness and
>poor design, in my opinion.

I do not disagree. But i have yet to see it happen.

B.

>
>>
>> B.
>
>
>David Fitzjarrell
Received on Tue Nov 20 2007 - 10:12:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US