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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: brutally simple question - number of triggers on a table

RE: brutally simple question - number of triggers on a table

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Fri, 22 Apr 2005 10:20:18 -0400
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF41050395B87D@usahm236.amer.corp.eds.com>

The basic question was to use database table level triggers or not?

Every action that an application takes should leave the data in a valid consistent state. The reality is that the only way to guarantee enforcement of complex business rules and data relationships is often to encode these rules into the database. This is done not just with PK, UK, and FK constraints but also using database table level triggers especially where an event driven process must take place.

If the requirement exists that for every change made to Table_A a record of the change must be kept you do not trust the changing application to record the change. You encode this into a trigger and the trigger updates an audit or history table.

Triggers are also useful to enforce referential integrity to a remote database object.

Every table does not need a trigger. Most in fact probably do not, but there are times when database level table triggers are the only true reliable solution to enforcing application data integrity.

IMHO -- Mark D Powell --

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 22 2005 - 10:25:15 CDT

Original text of this message

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