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 -> an ON-COMMIT trigger desperately needed

an ON-COMMIT trigger desperately needed

From: <kgboyce_at_wellmanage.com>
Date: 2000/06/30
Message-ID: <8jipth$lqu$1@nnrp1.deja.com>#1/1

How do we get oracle to implement the following or does anyone know an alternative solution???? Seems like a no brainer to me and I am wondering why they wouldn't have provided this functionality before.

In order to enforce one to one relationships an ON-COMMIT trigger in the Oracle Server which fires every time a commit call is executed is needed. I would like to be able to do as follows.

  1. for each row on my master table and my child table I will store the primary key into a table of records in a package. There are existing triggers to support this functionality in oracle.
  2. when the on-commit fires I will eliminate duplicate key values from table of records and call a procedure validate_transaction (primary key) which will check the master table and it's child table to ensure that rules (for instance 1-to-1) are adhered to. If not I will report the relavent errors and not proceed with commit.
  3. If commit is successful I will clear table of records

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Jun 30 2000 - 00:00:00 CDT

Original text of this message

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