|
Posted by Plamen Ratchev on 09/30/91 12:00
Hi Michael,
I would definitely go with stored procedures. Too many benefits, just to
name a few:
- Security - you do not have to manage security at table level, but rather
by granting execute permissions (or using EXECUTE AS if on SQL Server 2005);
no direct access and revealing of your database schema.
- Data integrity - you can control the DML against the data; example: it is
easy to run a direct UPDATE with no WHERE, but in the stored procedure you
can enforce WHERE.
- Maintainability - your stored procedures will be like an additional
application layer where you can easily handle things like error handling,
transactions, etc.
- Performance - you can write the code in the stored procedure in the most
efficient way to access the data; the stored procedure is precompiled code,
the syntax is verified, and the execution query plan can be reused.
If you search Internet you will find many good examples and articles on the
topic.
HTH,
Plamen Ratchev
http://www.SQLStudio.com
[Back to original message]
|