Database Trigger

Why Trust Techopedia

What Does Database Trigger Mean?

A database trigger is stored code that is executed immediately after a predefined event. It is used to ensure the coordinated performance of related actions. Although implementation varies, all major relational databases support triggers.

Advertisements

Techopedia Explains Database Trigger

For example, a human resources (HR) application requires that every employee manager receive an informational e-mail immediately after an employee’s leave request is submitted. When a record is written into a table that stores employee leave requests, a created trigger fires and invokes the e-mail-sending procedure to the manager.

Another common trigger use is to save important original data, in its unchanged state, to maintain an audit trail or ensure that the original data remains accessible in the event of accidental changes. For example, the same HR application may contain a trigger that is executed when an employee’s bank details are changed. The trigger first saves the original information to another table; this allows data modification.

Advertisements

Related Terms

Margaret Rouse
Technology Expert
Margaret Rouse
Technology Expert

Margaret é uma premiada redatora e professora conhecida por sua habilidade de explicar assuntos técnicos complexos para um público empresarial não técnico. Nos últimos vinte anos, suas definições de TI foram publicadas pela Que em uma enciclopédia de termos tecnológicos e citadas em artigos do New York Times, Time Magazine, USA Today, ZDNet, PC Magazine e Discovery Magazine. Ela ingressou na Techopedia em 2011. A ideia de Margaret de um dia divertido é ajudar os profissionais de TI e de negócios a aprenderem a falar os idiomas altamente especializados uns dos outros.