The need and the usage

The need and the usage:

Triggers are commonly used to:
a) Prevent changes (e.g. Prevent an invoice from being changed after it's been mailed out)
b) Log changes (e.g. Keep a copy of the old data)
c) Audit changes (e.g. Keep a log of the users and roles involved in changes)
d) Enhance changes (e.g. Ensure that every change to a record is time-stamped by the server's clock, not the client's)
e) Enforce business rules (e.g. Require that every invoice have at least one line item)
f) Execute business rules (e.g. Notify a manager every time an employee's bank account number changes)
g) Replicate data (e.g. Store a record of every change, to be shipped to another database later)
h) Enhance performance (e.g. Update the account balance after every detail transaction, for faster queries)

0 comments:

Post a Comment

Blogger news