community
directory
books
authors
images
encyclopedia

Email:
Password:
Register

Knowledgerush Search

 

Google
  Web knowledgerush


Search for images of Stored procedure


Message boards   Post comment

Stored procedure

A stored procedure is a program (or procedure) which is physically stored within a database. They are usually written in either Java or a proprietary database language like PL/SQL for Oracle database. The advantage of a stored procedure is that when it is run, in response to a user request, it is run directly by the database engine, which usually runs on a separate database server. As such, it has direct access to the data it needs to manipulate and only needs to send its results back to the user.

Typical uses for stored procedures include data validation which is integrated into the database structure (stored procedures used for this purpose are often called triggers), or encapsulating some large or complex processing (such as manipulating a large dataset to produce a summarised result). The latter will often run faster as a stored procedure than if it had been implemented as, for example, a program running on a client computer and communicating with the database by sending SQL queries and receiving results, because the stored procedure running directly on the database server does away with the overhead of communicating large amounts of data back and forth.

Stored procedures can also be a good thing when a database is manipulated from many external programs. By embedding "business logic" in the database using stored procedures, the need to embed the same logic in all the programs which access the data is reduced. This can simplify the creation and, particularly, the maintenance of the programs involved.

 

Compose Your Message

Your Email Address or Pen Name (optional):
Subject:
Your Message:
 

 

 

 

 

 

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Stored procedure".

 

Contact UsPrivacy Statement & Terms of Use

 
Copyright © 1999-2003 Knowledgerush.com. All rights reserved.