Re: "All triggers are evil",..., really?

  • From: "Niall Litchfield" <niall.litchfield@xxxxxxxxx>
  • To: mcdonald.connor@xxxxxxxxx
  • Date: Wed, 3 Sep 2008 15:31:37 +0100

I agree entirely with both of these remarks. The refusal to do
'autoincrement' columns just seems to be pig-headedness to me (or
maybe not sexy enough) especially given that in 11g you can do direct
assignment of seq.nextval in pl/sql (though it's just a selight of
hand).

As to always on business rukles, although the original usenet
discussion about business logic in the app or the database seems to
have disappeared you can see what I said 4 years ago at
http://ora-01422.ora-code.com/msg/26467.html. It seems to me that if
your business logic really is a business rule then

a) it always ought to be applied - else it's a "business optional
hoop" - i.e be always on and not disableable
b) it ought to apply no matter where the transaction comes from.

Interestingly the chap with the j2ee app who wanted all business rules
in the app did that all data loads and interfaces should talk to his
app always. I'd love to know how that went down in the end.

n.b I have now revised my opinion a bit, I now don't believe that
there really are such things as business rules at all, I think there's
mostly "business practices" which of course vary by department, by
manager and by mood.

Jadedly

Niall Litchfield
http://www.orawin.info/

On Wed, Sep 3, 2008 at 2:49 PM, Connor McDonald
<mcdonald.connor@xxxxxxxxx> wrote:
> And one thing I forgot....shucks, Oracle, how hard can it be to implement
>
> alter table T modify C default SEQ.NEXTVAL
>
> That would eliminate half the triggers floating around out there in one
> swoop...
>
>
> On Wed, Sep 3, 2008 at 9:48 PM, Connor McDonald <mcdonald.connor@xxxxxxxxx>
> wrote:
>>
>> In perhaps a perverse way, I'd be bigger fan of triggers if you could
>> *not* disable them...Then people would have to *really* sit down and think
>> about whether the trigger they are about to implement is a genuine
>> implementation of a rule (eg audit, complex constraint) versus a convenience
>> that could/should have been coded in the application ...
>>
>> I always find it hilarious when you have to wear the day-to-day hit of
>> capturing changes to every row on every row due to some "cast hard in
>> concrete business rule of - thou shalt audit everything" ....but then take a
>> system outage because a large scale data change has to occur, and the same
>> people then insert ..."but we don't want to audit that" comes along the
>> line...
>>
>> --
>> Connor McDonald
>> ===========================
>> email: connor_mcdonald@xxxxxxxxx
>> web: http://www.oracledba.co.uk
>>
>> "Semper in excremento, sole profundum qui variat"
>>
>
>
>
> --
> Connor McDonald
> ===========================
> email: connor_mcdonald@xxxxxxxxx
> web: http://www.oracledba.co.uk
>
> "Semper in excremento, sole profundum qui variat"
>



-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info
--
//www.freelists.org/webpage/oracle-l


Other related posts: