Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Default column value of MAX +1 of column - possible in Oracle 9i? ++ flow/events/TAPI

Re: Default column value of MAX +1 of column - possible in Oracle 9i? ++ flow/events/TAPI

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 25 Mar 2005 07:02:06 -0500
Message-ID: <RZ-dnYe9xelcYN7fRVn-1A@comcast.com>

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:22s741dfpoej4fmi0cjnrkqlkfasmg5127_at_4ax.com...
> On Fri, 25 Mar 2005 07:20:32 GMT, Kenneth Koenraadt wrote:
>
>>You have an application. A minor correction must be made. It is now
>>easier to implement a trigger instead of changing the code. So you do.
>>
>>Next time you need corrections, another trigger is implemented. And so
>>you continue n times.
>>
>>You now have 2 tracks to housekeep: The original application code AND
>>the triggers. One is flow-based, and one is event-based (the
>>triggers). And those 2 tracks have to be coordinated. This will get
>>more and more tedious over time, as the application logic changes over
>>time, mostly in a more complicated direction.
>
> You are talking about triggers, and in reality you seem to be
> discussing lousy development methods. Those are two completely
> unrelated issues.
>
>
> --
> Sybrand Bakker, Senior Oracle DBA

the too many triggers argument can be equally applied to too many procedures

so, sloppy use of triggers is no worse (eviler, if you will) than sloppy use of procedures

event vs. flow logic should not be a determining factor -- after all, events cause flow and flow triggers events. all applications include event logic (even simple date validation is an event-driven action, it's just built in). so it's more important to figure out what business events trigger what business actions (term used in the traditional, not the db object, sense) and then determine the appropriate way to implement those actions.

if you're using a DML API (or TAPI, if you will) then that may be the appropriate place to implement the code for the triggered actions. however, if you've got apps that submit DML directly to the tables (or views), then triggers are the appropriate 'bottom-line' mechanism for implementing the required actions.

there are a lot of advantages to the DML API approach -- but sometimes other factors prevent its use, so triggers become more important

++ mcs Received on Fri Mar 25 2005 - 06:02:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US