Database Reference
In-Depth Information
In the relational database, a stored procedure is an executable
code that is stored in the relational database. Stored procedures
group common operations, like inserting a tuple into a relation or
encapsulating complex business logic and calculations. Stored pro-
cedures are more performance than writing application code, for the
following reasons:
• There is no communication between the relational database
and other external applications.
• There is no need to compile and execute the stored procedure
for each instance, as the stored procedure is compiled once.
In the relational database, structured query language (SQL) is the
standard computer language for managing data in the relational data-
base [5]. All relational database management systems, like Oracle,
Informix, and SQL Server, use SQL as a basic database language.
The SQL operation for manipulating the relation is described as
follows:
• Select operation: This operation is used to get groups of tuples
from the relation database. The SQL command for the select
operation is described as follows:
SELECT [A 1 ,A 2 ,...,A n ]
FROM R
WHERE P
where R is a relation, A 1 ,A 2 ,...,A n are the attributes from
relation R, and P is the condition of the select statement that
defines the tuples to be retrieved.
• Insert operation: This operation is used to insert tuples in
the relation. The SQL command for the insert operation is
described as follows:
INSERT
INTO R [A 1 ,A 2 ,...,A n ]
VALUES [a 1 ,a 2 ,...,a n ]
where R is a relation, A 1 ,A 2 ,...,A n are the attributes from
relation R, and a 1 ,a 2 ,...,a n are values from domains of
A 1 ,A 2 ,...,A n that will be inserted.
Search WWH ::




Custom Search