Quantcast
Channel: Answers for "Trigger question for DBAs"
Browsing latest articles
Browse All 16 View Live

Answer by Tom Staab

I'm not a DBA, but I've been asked to play one from time to time. I like the completeness of triggers (as long as security best practices are followed instead of everyone using "sa"). I like the...

View Article


Answer by Jack Corbett

This is a classic "It Depends" question. I typically only use them for auditing, but I also have used them to enforce some RI (FK could be from one of 2 tables). I've also used them in an EAV design to...

View Article


Answer by Håkan Winther

I agree with Jack, "It depends", but i try to avoid them due to performance issues. If you are loading 3-4 000 000 rows per day into 1 table, or updating the table with 120 000 000 rows, you don't want...

View Article

Answer by Matt Whitfield

I use INSTEAD OF triggers quite a lot when I want to change the functionality of a system. For example, on my company's website, we have a bug tracker system, which expected to find it's own tables...

View Article

Answer by Kev Riley

As a rule, I'm definitely in the 'No' category.Hate it when business logic, or workflow is implemented as triggers. If you need to do something to some data, as part of a process, then put it with the...

View Article


Answer by David 1

I would use AFTER triggers only to enforce a business rule that cannot otherwise be enforced by declarative constraints. Usually that means the trigger just needs to rollback a transaction without...

View Article

Answer by Jay Bonk

I fall into the categories mentioned, I don't like to see business logic at in a trigger. I do use them for auditing data changes; and to enforce RI where it's not possible to do with a FK...

View Article

Answer by Grant Fritchey

Do I allow them? Yes. But do I encourage them? Heck no. I realize they have their place in a well designed database system, but I've noticed that more often than not they are either used incorrectly or...

View Article

Browsing latest articles
Browse All 16 View Live