PDA

View Full Version : استفاده از view , Store procedure



mariaviolla
شنبه 22 خرداد 1389, 20:56 عصر
یه سوال ایا همیشه استفاده از view و store procedure ها مفیده ؟ تاثیر مثبت داره؟ اگه بله چه تاثیری در performance برنامه داره ؟

منتظرم مرسی

r00tkit
شنبه 22 خرداد 1389, 21:09 عصر
benefits برای stored procedures





The benefits of using stored procedures in SQL Server rather than Transact-SQL programs stored locally on client computers are:


They are registered at the server.
They can have security attributes (such as permissions) and ownership chaining, and certificates can be attached to them.

Users can be granted permission to execute a stored procedure without having to have direct permissions on the objects referenced in the procedure.
They can enhance the security of your application.

Parameterized stored procedures can help protect your application from SQL Injection attacks.
They allow modular programming.

You can create the procedure once, and call it any number of times in your program. This can improve the maintainability of your application and allow applications to access the database in a uniform manner.
They are named code allowing for delayed binding.

This provides a level of indirection for easy code evolution.
They can reduce network traffic.

An operation requiring hundreds of lines of Transact-SQL code can be performed through a single statement that executes the code in a procedure, rather than by sending hundreds of lines of code over the network.