Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative to triggers in SQL Server 2000

Status
Not open for further replies.

shruti18

MIS
Jun 22, 2005
30
US
A question about SQL Server 2000:
Is it true that in SQL Server 2000, triggers may not be necessary. If so, then what could be the alternative?
 
And of course - carefully with DTS/bulk inserts :)

------
Theory: everybody knows everything, nothing works
Practice: everything works, nobody knows why

[banghead]
 
It depends on what you are doing with the trigger whether it is necessary or not. Some things can be handled with constraints on the field. Also using cascade update and cascade delete can allow you to avoid some triggers. Creating a calculated field can also help avoid some triggers. ANd yes you could put all the business rules in an sp but this is often not a good idea as it doesn't account for anyone who changes the data in some other fashion. And if another sp is written for a particular special case then it will also need that business rule code and sooner or later someone will forget it and then you lose your data integrity.

Questions about posting. See faq183-874
Click here to help with Hurricane Relief
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top