Re: Question on Insert Trigger

From: Serge Rielau <srielau_at_ca.ibm.com>
Date: Sat, 08 Mar 2008 23:55:52 -0500
Message-ID: <63h8v4F278733U1@mid.individual.net>


DA Morgan wrote:
> But I am wondering ... would you use a package variable, when
> you get them into DB2, to enforce a business rule?
Ah why not? Depends on your rule.

E.g. if I have a rule that says: Ignore all input provided by user DAMORGAN that seems like a sensitive thing to do. Rules can be user dependent, can they not? You like to point out that certain products fail to provide BEFORE TRIGGERs. Aren't before triggers used to enforce business rules? By claiming that constraints suffice you say BEFORE TRIGGERs are not needed and you bite your own proverbial tail. BEFORE TRIGGERs are used where CHECK CONSTRAINTs fail, such as looking at data in different tables, or looking up variable content.

> With respect to your other question:
> http://www.oracle.com/technology/community/oracle_ace/index.html
So the answer is no, you are an "I", not a "We".

Cheers
Serge

PS: Variables in DB2
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0050499.html

-- 
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Received on Sat Mar 08 2008 - 22:55:52 CST

Original text of this message