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: <fitzjarrell_at_cox.net>
Date: Tue, 20 Nov 2007 07:49:28 -0800 (PST)
Message-ID: <ae30bef9-ce3c-4f49-a16f-989c37449ae4@41g2000hsh.googlegroups.com>


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 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.

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.

>
> B.

David Fitzjarrell Received on Tue Nov 20 2007 - 09:49:28 CST

Original text of this message

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