TriggerExamples.htm
Trigger Examples
-
Trig1 When tuples are inserted into table S, this inserts into table T any tuple whose a-sttribute is 6.
-
Trig2 When a tuple is inserted into table S and has a-attribute 6, this changes the a-attribute to NULL.
-
Trig3 When a tuple is inserted into S with a-attribute 6, this deletes it.
-
Trig4 This is an instead-of trigger for updating view simpleClasses, which is a simple query of some of the attributes from table Classes.
-
Trig5 This is an instead-of trigger for updating view RS, which is the natural join of tables R and S; this trigger updates the base tables R and S since the view itself if not updateable.