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 08:28:21 -0800 (PST)
Message-ID: <fdb8ba0e-f817-483d-a37d-cd1a7c98b270@d50g2000hsf.googlegroups.com>


Comments embedded.
On Nov 20, 10:12 am, Brian Tkatch <N/A> wrote:
> On Tue, 20 Nov 2007 07:49:28 -0800 (PST), "fitzjarr..._at_cox.net"
>
>
>
>
>
> <fitzjarr..._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.
>

No, it is not, it is a (relatively) relational repository for said data,. and as such should implement data validation policies.

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

Think again, as your last attempt missed the mark by a considerable distance.

> Most of the time
> the application is even more cryptic!

A testament to poor design and implementation, which, in my opinion, you suggested in your original response.

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

You don't work for a living? I do and, in general, error messages from a user interface are less likely to be as confusing as those sometimes produced by Oracle. Simply because you can't author a userfriendly  block of error text doesn't mean someone else can't.

> B.
>
>
>
>
>
> >> B.
>
> >David Fitzjarrell- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

David Fitzjarrell Received on Tue Nov 20 2007 - 10:28:21 CST

Original text of this message

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