Day 19. Solving Special Trigger Problems

As you have learned on Day 18, "Writing and Testing Triggers," triggers give you the ability to have SQL code execute automatically whenever an action, INSERT, UPDATE, or DELETE is taken against a table. Now that you know how to create triggers and where you should use them, you will see how they can assist you in solving some special requirements in an application.

When designing and creating a complex application that uses T-SQL to access data in a relational database, there will be times when you will want to ensure that certain business rules are enforced. There will also be a need for a particular update to be made throughout multiple tables. By using triggers, you can accomplish these goals. Some of the topics we will cover in today's lesson are

  • Enforcing business rules

  • Referential integrity

  • Cascading triggers

  • Managing summary columns

  • Creating an audit trail

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset