Database PDF
Database PDF
Enhanced Data
Models for
Advanced
Applications
Event:
Database modification
Condition:
Action:
Trigger Example
Generalized Model (cont.)
When a new employees is added to a department, modify
the Total_sal of the Department to include the new
employees salary
Condition
Creates a trigger
Alters a trigger (assuming one exists)
Conditions
Generalized Model (cont.)
AFTER
BEFORE
INSTEAD OF
Row-level
Statement-level
Statement-level triggers
Condition
Generalized Model (cont.)
Any true/false condition to control whether a
trigger is activated on not
Action
Generalized Model (cont.)
Action can be
Triggers on Views
Generalized Model (cont.)
INSTEAD OF triggers are used to process view
modifications
Activate
Deactivate
Drop
Immediate consideration
Deferred consideration
Detached consideration
Deferred consideration
Before
After
Instead of
Detached consideration
Trigger examples
Gregorian (western)
Chinese
Islamic
Hindu
Jewish
Etc.
Duration events
Bitemporal database
E.g., age
Spatial Databases
Spatial Database Concepts
Keep track of objects in a multi-dimensional
space
Maps
Geographical Information Systems (GIS)
Weather
Spatial Databases
Spatial Database Concepts
Typical Spatial Queries
Spatial Databases
Spatial Database Concepts
R-trees
Quad trees
Recap