Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Where to do Data Validation?
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.
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.orgReceived on Tue Nov 20 2007 - 11:51:49 CST