Summary

SQL Server allows you to group statements together in a program unit that will execute automatically whenever a data modification statement occurs. This code, stored on the server as a trigger, can be defined as either an after trigger or an instead-of trigger. Triggers can maintain referential integrity in ways that constraints cannot, and you can write triggers to enforce other business rules that you can't specify using constraints.

To fully understand how triggers affect the work done in your database, you also need to understand how transactions work. SQL Server provides four different modes of transaction behavior, called isolation levels, which control what data is available to other processes while you're working with that data. Programming effectively with Transact-SQL requires that you understand transactional topics, such as when transactions will be committed and when they can be rolled back. Since you'll likely be working in a multiuser environment, it is vital that you make the appropriate concurrency and consistency choices to suit the isolation level of your environment.



Inside Microsoft SQL Server 2000
Inside Microsoft SQL Server 2000
ISBN: 0735609985
EAN: 2147483647
Year: 2005
Pages: 179
Authors: Kalen Delaney

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net