Personal tools
You are here: Home Classes Spring 2006 CS 311 TriggerExamples.htm
Document Actions

TriggerExamples.htm

by bob last modified 2006-04-28 16:18

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.

 

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: