Encyclopedia of Database Systems

2018 Edition
| Editors: Ling Liu, M. Tamer Özsu

Database Trigger

  • Mikael Berndtsson
  • Jonas Mellin
Reference work entry
DOI: https://doi.org/10.1007/978-1-4614-8265-9_511

Synonyms

Triggers

Definition

A database trigger is code that is executed in response to events that have been generated by database commands such as INSERT, DELETE, or UPDATE.

Key Points

Triggers are code that are executed in response to events that have been generated before or after a database operation. They are sometimes separated as pre- and post-triggers in the literature. A pre-trigger can be used as an extra validation check before the database command is executed, whereas a post-trigger can be used as a notification that the database command has been executed.

Triggers can be classified according to trigger granularity: row-level triggers or statement-level triggers. In case of row-level triggers, each row will generate an event, whereas statement-level triggers occur only once per database command.

Overviews of database triggers can be found in [1, 2].

Cross-References

Recommended Readings

  1. 1.
    Kulkarni KG, Mattos NM, Cochrane R. Active database features in SQL3. In: Active rules in database systems; 1999. p. 197–219.CrossRefzbMATHGoogle Scholar
  2. 2.
    Sudarshan S, Silberschatz A, Korth H. Triggers, chap. 8.6; 2006. p. 329–34.Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.University of Skövde, The Informatics Research CentreSkövdeSweden
  2. 2.University of Skövde, School of InformaticsSkövdeSweden

Section editors and affiliations

  • M. Tamer Özsu
    • 1
  1. 1.Cheriton School of Computer ScienceUniversity of WaterlooWaterlooCanada