Stored Procedures
|
Triggers
|
A Stored procedure is a precompiled set of Structured Query Language (SQL) statements
with an assigned name and stored in the server database.
|
Triggers are SQL procedures
that initiate an action when any event occurs. It is associated with a
particular table. The events could be insert, update or delete.
|
We need to call procedures
explicitly.
|
Triggers are implicitly
executed.
|
Stored procedure improves
performance and reduces network traffic.
|
Triggers are used to maintain the
referential integrity of data by changing the data in a systematic fashion.
|
It is helpful in controlling access to data (end-users
may enter or change data but do not write procedures), preserving data integrity (information is entered in a consistent
manner), and improving productivity
(statements in a stored procedure only need to be written one time).
|
DBMS automatically fires the
trigger as a result of data modification to the associated table. It can also
execute stored procedures.
|
My Blog-Collections
I think writing blogs is indeed an activity done by intellectual people. So I am also following the same way. It is good practice to convert whatever going into your mind to specific words and sharing your knowledge. Here I will keep sharing my thoughts and share some technical topics related to my profession as well.
Monday, 17 December 2012
Difference between Stored procedures and Triggers
Subscribe to:
Posts (Atom)