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

  • From: Andrew Kerber <andrew.kerber@xxxxxxxxx>
  • To: Norman Dunbar <oracle@xxxxxxxxxxxxxxx>
  • Date: Tue, 12 Jun 2012 08:57:21 -0500

By the borderline call on the triggers, it depends on how the triggers are
used.  I have seen 300 line+ triggers that really needed to be part of the
application code, because they changed frequently and were really for
business logic as opposed to database maintenance.
On Tue, Jun 12, 2012 at 8:53 AM, Norman Dunbar <oracle@xxxxxxxxxxxxxxx>wrote:

> Hi Andrew,
>
>
> On 12/06/12 14:46, Andrew Kerber wrote:
>
>> Ah yes, the religious wars.
>>
> Religion? No thanks! ;-)
>
>
>
>  I like to keep logic that I call data
>> integrity related in the database, that would be check constraints and
>> foreign key constraints, etc.
>>
> Agreed.
>
>
>  Possibly triggers, but that is a borderline call.
>>
> Triggers, borderline? Where else would you have them but in the database?
>
>
>  Logic that is likely
>> to change year by year should be kept in the application code.
>>
> I assume you do not refer to client server applications? I have a few of
> those (ok, a lot) that are still in use. Rolling out potentially thousands
> of applications to users is far more difficult than applying a patch to one
> database. And sometimes, users hibernate their desktops so don't login and
> get the latest application version.
>
> For multi-tier stuff, it's acceptable(ish) to upgrade the middle tier from
> time to time, I agree.
>
>
>  I can see both sides, but I know my opinion is correct :).
>>
> I like your thinking! ;-)
>
>
>
> Cheers,
> Norm.
>
> --
> Norman Dunbar
> Dunbar IT Consultants Ltd
>
> Registered address:
> Thorpe House
> 61 Richardshaw Lane
> Pudsey
> West Yorkshire
> United Kingdom
> LS28 7EL
>
> Company Number: 05132767
>



-- 
Andrew W. Kerber

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


--
http://www.freelists.org/webpage/oracle-l


Other related posts: