Re: rules,procedures,events

From: Thomas J Kyte <tkyte_at_us.oracle.com>
Date: 1996/02/20
Message-ID: <4gbpmn$140_at_inet-nntp-gw-1.us.oracle.com>#1/1


Joseph Snider <jsnider_at_ix.netcom.com> wrote:

>I have a question about what is the equivalent feature(s) in ORACLE.
>In Ingres, I currently use "rules" on tables when an update,delete,

                          TRIGGERS

>insert occurs, which calls a "procedure" which is code that performs
PROCEDURE
>a function, and one of the functions could be to raise an "event"
ALERTS

>which a background program can wait for and start processing requests.
>This set of features in Ingres is called knowledge management. What are
>the equivalent features in Oracle?

for example:

create table T ( a int )
/

create procedure do_something( a in T.a%type ) as
begin

  • some code here end; /

create trigger T_trigger
after insert on T
for each row
begin

   do_something( :new.a );
   dbms_alert.signal( 'MyEvent', 'Some Data For My Event' ); end;
/

Creates a table T with a 'rule' T_trigger that will invoke the procedure 'do_something' and then raise the event 'MyEvent'. Alerts are documented in the application developers guide. Triggers in the application developers guide and pl/sql guide. Procedures documented in the pl/sql guide.

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government



opinions and statements are mine and do not necessarily reflect the opinions of Oracle Corporation. Received on Tue Feb 20 1996 - 00:00:00 CET

Original text of this message