RAD Studio for Microsoft .NET
ContentsIndex
PreviousUpNext
Stored Procedure Overview

All relational databases have certain features in common that allow applications to store and manipulate data. A stored procedure is a self-contained program written in a language specific to the database system. A stored procedure typically handles frequently repeated database-related tasks, and is especially useful for operations that act on large numbers of records or that use aggregate or mathematical functions. Stored procedures are typically stored on the database server. 

Calling a stored procedure is similar to invoking a SQL command, and RAD Studio provides support for using stored procedures in much the same ways as it supports editing and using SQL command text.  

Stored procedures can enhance your database applications in the following ways: improve the performance, security, and reliability of your applications.

  • Performance—stored procedures can improve the performance of a database application by taking advantage of the server’s usually greater processing power and speed, and reducing network traffic by moving processing to the server. Also, the compiled SQL used in a stored procedure executes faster typically than standard SQL command text.
  • Security—by creating a layer between clients and the database, stored procedures can enhance security for your data. You don't need to grant database permissions to individual users. Instead, you can grant users permission to execute a stored procedure independently of underlying table permissions.
  • Reliability—stored procedures help to centralize code, which makes it easier to isolate and troubleshoot problems. Also, stored procedures allow you to move business logic which is inherent to the database into the database, thus making it available from all clients regardless of the language they are written in.
When you use the AdoDbx ClienttCommand Text Editor and the Data Explorer, both provide the ability to view your stored procedure parameters, specify input parameters, and execute your stored procedures as you design your application.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!