Thursday, September 16, 2004

Advantages in using stored procedures(Database)

Yukon is moving towards a subset of the .NET runtime engine inside the SQL Server Database.

So, what's the history behind this move? Stored Procedures -- the pre-cursors -- business logic being embedded in the database is a need -- Why? -- see below.

There are many advantages in using stored procedures, including the following:

· They are typically the most efficient way to access the database.

· They can reduce network round trips.

· They are easy to change in deployed applications.

· They make it is easier to tune the performance of your data access code.

· They provide a better way to give out permissions rather than to give permissions out for base tables.

· They allow the database schema (and schema changes) to be hidden.

· They help to centralize all the data access code.

· If all database access is done through your stored procedures, you get a controlled set of entry points.

· Auditing is easily solved.

· Disconnected pessimistic locking is easily solved.

· Data-close business rules can be put in stored procedures.

· There is no need for triggers, which is good for debuggability and maintainability.

No comments: