Advantages of using Stored Procedures

What are the advantages of using Stored Procedures?

Stored procedures provide performance benefits through local storage, precompiling the code, and caching.

Stored procedures offers security features that includes encryption and privilege limits that restrict users from modifying structure of stored procedure.

Describe the purposes and advantages stored procedure?

Stored procedures manage, control and validate data.
Large queries can be avoided.
Reduces network traffic since they need not be recompiled.
Even though the stored procedure itself may be a complex piece of code, we need not write it over and over again. Hence stored procedures increases reusability of code
Permissions can be granted for stored procedures. Hence, increases security.

What are the advantages of using Stored Procedures?

Advantages of using stored procedures are:- They are easier to maintain and troubleshoot as they are modular.
- Stored procedures enable better tuning for performance.
- Using stored procedures is much easier from a GUI end than building/using complex queries.
- They can be part of a separate layer which allows separating the concerns. Hence Database layer can be handled by separate developers proficient in database queries.
- Help in reducing network usage.
- Provides more scalability to an application.
- Reusable and hence reduce code.
What are the ways to code efficient transactions?
SQL server transactions - We shouldn't allow input from users during a transaction......
Differences among batches, stored procedures & triggers
SQL server Batches, stored procedures & triggers - A batch is a group of one or more SQL statements. SQL Server compiles the statements of a batch......
What are the instances when triggers are appropriate?
Scenarios for using triggers. To create a audit log of database activity. To apply business rules. To apply some calculation on data from tables which is not stored in them.....
Post your comment