Stored Procedure vs. Triggers
Which one is better when it comes to security and performance?
Which one is better when it comes to security and performance?
The question is like asking: which is better, a screwdriver or a hammer?
They have very different purposes. For example an application can call a Stored Procedure whereas it cannot call a TRIGGER.
Please be more explicit about what you are hoping to accomplish, and perhaps we can provide you better information.
As Arnie already told, triggers an procedures are different approaches. E.g., if you know that your application on top of the database is ONLY using the stored procedures to manipulate the data or the business logic is all on the apllication layer and the database is NOT manipulated by other direct talbe manipulation, the you would take the procedures, otherwise not being sure if another application or process changes the data and therefore bypasses the stored procedure, then you would probably use the triggers. There are much more other considerations to take in place, it′s not a this OR that, in many cases a combination of both also makes sense. Jens K. Suessmeyer