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: gazzag <gareth_at_jamms.org>
Date: Tue, 20 Nov 2007 09:02:09 -0800 (PST)
Message-ID: <1b274e44-3557-48fa-b42e-53935e3ea1e6@i37g2000hsd.googlegroups.com>


On 20 Nov, 02:38, Galen Boyer <galen_bo..._at_yahoo.com> wrote:
> A very solid way to think is that the database defines your data
> validations and then, you author a meta reader that reads the metadata
> from the database and produces code for the front-end that then is used
> at runtime to check the same things. Defined in one place and then
> replicated by code into the place directly next to the user.
>
> Not all in the database will make it into the GUI tier and not all
> checks needed in the GUI will have a place in the database, but it sure
> does solve most of what you are looking for.
>
> --
> Galen Boyer

I agree. I also think that one should be mindful of the difference between data "validation" and data "verification". That is to say, "validation" is to validate the data on input. e.g. yes, the underlying datatype in the database may well be a date datatype but the application is expecting, for example, three pairs of two numbers to signify DDMMYY. If the format is valid it will be passed to the database for "verification". That is to say: yes, that's a valid date but does it make sense, in this context, with our business rules and logic as enforced by database design and the use of constraints.

As a _general_ rule, validation is done at application level; verification at database level.

HTH -g Received on Tue Nov 20 2007 - 11:02:09 CST

Original text of this message

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