Re: Any reason not to have logic in the db?

From: Andrew Kerber <andrew.kerber_at_gmail.com>
Date: Tue, 12 Jun 2012 08:46:21 -0500
Message-ID: <CAJvnOJbxKzXraKhpVfbXOCckrEw4RwtGCGWiz+Hcc8uhYND=4A_at_mail.gmail.com>



Ah yes, the religious wars. I like to keep logic that I call data integrity related in the database, that would be check constraints and foreign key constraints, etc.
Possibly triggers, but that is a borderline call. Logic that is likely to change year by year should be kept in the application code.

I can see both sides, but I know my opinion is correct :).

On Tue, Jun 12, 2012 at 8:06 AM, Norman Dunbar <oracle_at_dunbar-it.co.uk>wrote:

> Hi Paul,
>
> > What I want to know is: Is there any reason whatsoever
> > to have logic outside the database that could potentially
> > be kept there - notably CHECKs, CONSTRAINTs,
> > TRIGGERs, containing possibly complex PL/SQL - i.e.,
> > it's sort of a question about App-tiers vs. DB.
> No, never, not under any circumstances at all. Other opinions are
> available, however, but they are wrong! ;-)
>
> > My own opinion (to put my cards on the table) is that
> > "logic" should be stored as far down the stack as possible
> > (DB, first, then app-server...&c).
> Agreed. The best place to protect and keep the data secure, is within
> the database.
>
> <SNIP>

-- 
Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'


--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jun 12 2012 - 08:46:21 CDT

Original text of this message