Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 8 Advanced SQL Pearson Education © 2014.

Similar presentations


Presentation on theme: "Chapter 8 Advanced SQL Pearson Education © 2014."— Presentation transcript:

1 Chapter 8 Advanced SQL Pearson Education © 2014

2 Triggers Trigger Types Event: INSERT, UPDATE or DELETE
Defines an action that the database should take when some event occurs in the application Based on Event-Condition-Action (ECA) model Types Row-level Statement-level Event: INSERT, UPDATE or DELETE Timing: BEFORE, AFTER or INSTEAD OF Advantages and disadvantages of triggers 2

3 Trigger Format 3

4 Using a BEFORE Trigger 4

5 Triggers – Advantages Elimination of redundant code
Simplifying modifications Increased security Improved integrity Improved processing power Good fit with client-server architecture 5

6 Triggers – Disadvantages
Performance overhead Cascading effects Cannot be scheduled Less portable 6


Download ppt "Chapter 8 Advanced SQL Pearson Education © 2014."

Similar presentations


Ads by Google