|
|
 |
|
A
Generic Cascade Update Procedure
Oracle Tips by Mike Ault |
The Final
Piece, the Trigger
Once the source table and procedures are built,
we need to design a trigger to implement against our master tables
that automatically fires on update to the target master column.
Figure 3 shows an example of this trigger. One thing to notice about
the trigger is that it passes the master table name to the
UPDATE_TABLES procedure as well as the old and new values for the
column being updated. This allows the UPDATE_TABLES procedure to
select only the names and columns for the tables which are dependent
upon the master table for which the trigger is implemented. This
allows multiple master tables to utilize a single source table.
SEE CODE DEPOT FOR FULL SCRIPTS
 |
For more information on this topic, I recommend Don
Burleson's latest book "Oracle
Tuning: The Definitive Reference".
You can buy it direct from the publisher for 50%-off and get
instant access to the code depot of Oracle tuning scripts: |
http://www.rampant-books.com/book_1002_oracle_tuning_definitive_reference_2nd_ed.htm
 |
Expert Remote DBA
BC is America's oldest and largest Remote DBA Oracle support
provider. Get real Remote DBA experts, call
BC Remote DBA today. |
 |
|
|
|
|