Re: Protect record from deletion via trigger

From: Vladimir M. Zakharychev <>
Date: Tue, 1 Jul 2008 23:52:40 -0700 (PDT)
Message-ID: <>

On Jul 2, 1:09 am, hpuxrac <> wrote:
> On Jul 1, 4:10 pm, DA Morgan <> wrote:
> > hpuxrac wrote:
> > > Tom Kyte says ( and I believe him ) "Triggers are evil" ... therefore
> > > don't use them at all or at least minimize their usage.
> > If you are going to quote Tom, and he did say it, then quote him in
> > context:
> > Responding to the statement:
> > "Protecting data integrity is paramount,"
> > Tom wrote:
> > "indeed it is, that is why triggers are evil :)
> > Most of the time, "business logic"/"data logic" that is implemented in
> > triggers is done incorrectly (that is what I mean by people abuse
> > triggers)."
> >
> > It is not the triggers that are the issue ... it is poor implementations
> > with triggers. There is a time and place for triggers. And when used
> > correctly they can be the best solution possible.
> snip
> As usual you are off base way off.  Tom would like to see triggers
> totally removed from oracle ...
> How many times did he say "triggers are evil" this year at NEOOUG?  I
> would guess at least 20 times.
> Wonder what remark he signed books with this year?  Even you might be
> able to guess ...

From that blog post I'd say that Tom is against the triggers not because they are universally and unambiguously evil, but because a lot of people don't really understand how they work and when it's appropriate or inappropriate to use them and therefore often abuse them or implement them incorrectly. And because incorrect use of triggers leads to all sorts of hard to troubleshoot problems, he'd rather remove them altogether than regularly deal with consequences of their abuse. How many times did you answer the same question: "How do I enforce the order of execution of multiple triggers of the same kind on the same table because I need them to be executed in particular order?", and what your answer was? Oracle seem to have been bothered with it so often they even went as far as to implement declarative trigger execution ordering in 11g. :)

And did you notice that the second evil thing he'd like to be gone is autonomous transactions? I remember the time when Tom was fascinated by it. :) Actually, it's very cool feature, but regrettably it, too, is being abused way too often.

My $0.02,

   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm) Received on Wed Jul 02 2008 - 01:52:40 CDT

Original text of this message