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: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 20 Nov 2007 09:51:49 -0800
Message-ID: <1195581102.431182@bubbleator.drizzle.com>


Brian Tkatch wrote:
> On Mon, 19 Nov 2007 09:48:12 -0800 (PST), Vijai Kalyan
> <vijai.kalyan_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.
>
> 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.
>
> B.

Your first paragraph is frighteningly bad advice.

First what is the purpose of validation? There are two possible answers: 1. To protect the integrity of the data
2. To improve the efficiency of other error handling mechanisms by

    putting the validation closer to the source of the error ... for     example into the front-end user interface.

In no case can a validation in a front-end or tool protect data in a database from corruption ... EVER ... unless the quality of the data is guaranteed by the database itself.

Putting validation into the application will never, EVER, keep someone with SQL*Plus from destroying it.

Reconsider.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Nov 20 2007 - 11:51:49 CST

Original text of this message

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