Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Where to do Data Validation?
On Mon, 19 Nov 2007, 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?
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 BoyerReceived on Mon Nov 19 2007 - 20:38:09 CST