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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is there a way to conitionaly fire triggers ??

Re: Is there a way to conitionaly fire triggers ??

From: Andrew Babb <andrewb_at_mail.com>
Date: Fri, 14 May 1999 08:42:45 +0800
Message-ID: <373B7184.C650557E@mail.com>


Hi,

The last time I had to work with 'semi permanently' deletes was to add a flag to the original table, defaulting to NULL and with a delete value of 'Y' or similar.

In this way, you can hide the official table behind a view 'WHERE DELETE_FLAG is NULL', and if you ever need to access the semi deleted data, then it is still in the same table, which also cuts down on a degree of redo, when you semi delete the record.

Finally, if you need to get to the semi delete records quickly, then you could put an index (possibly BITMAP) on the DELETE_FLAG column, if the number of semi deletes is not that large.

Hope this helps,
Andrew

Matt Randle wrote:

> Hello,
>
> I have a slight problem with Oracle triggers.
>
> A requirement of the system we are building is that you can delete data
> either semi-permanently (it gets copied to an exact mirror of the actual
> tables) or permanently (it is removed without trace).
>
> The easiest way to do the semi-permanent delete is to use On Delete triggers
> to copy deleted data to the deleted tables. However, if I do this how do I
> allow for permanent delete - ie. is there anyway of stopping the trigger
> from firing and copying the deleted data ??
>
> Matt.
Received on Thu May 13 1999 - 19:42:45 CDT

Original text of this message

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