Hi.
I like triggers a lot cause in my view stored procedures have a lot of shortcomings; data consistensy is not guaranteed, there can be many SPs that do the same thing created by unaware developers; they require a lot of permission management and if they are numerous it's pita to answer questions like "is there a procedure to retrieve all agreements states or do I need to create one?".
Triggers however always fire so they ensure data consistency; they are tied to the table so it's easy to manage them.
I think of it as sps being procedural programming, and tirggers being object oriented sortof due to the aforementioned points.
However I see that most poeple don't like triggers and hesitate to use them even when they are needed for simple data consistency, trying to find some other way to deal with the problem. Why's that? What disadvantages do tirggers have?
I like triggers a lot cause in my view stored procedures have a lot of shortcomings; data consistensy is not guaranteed, there can be many SPs that do the same thing created by unaware developers; they require a lot of permission management and if they are numerous it's pita to answer questions like "is there a procedure to retrieve all agreements states or do I need to create one?".
Triggers however always fire so they ensure data consistency; they are tied to the table so it's easy to manage them.
I think of it as sps being procedural programming, and tirggers being object oriented sortof due to the aforementioned points.
However I see that most poeple don't like triggers and hesitate to use them even when they are needed for simple data consistency, trying to find some other way to deal with the problem. Why's that? What disadvantages do tirggers have?