 |
PLSQL Overview
This overview aims to answer the questions what is PLSQL, what features
does it provide and why should I use it.
What is PLSQL?
PLSQL
is Oracle's proprietary programming language for use with its
databases. It is a high-level, block-structured programming
language that is based on
ADA (therefore having a syntax similar to Pascal, Modula-2 and Ada)
providing procedural extensions to SQL to make data manipulation
easier.
What Are The Advantages of Using It?
It is tightly
integrated with both the Oracle database and SQL (the lingua franca for
all databases), giving it a number of
advantages over other languages like C#, C, or Visual Basic as follows:
- Performance - both at run time an design time.
As it uses the same basic datatypes as SQL there is no need
to translate them at design time or run time.
- Reduced network traffic - code can
be stored in the database thereby eliminating the round trip
from
client to server and back again and enabling the stored procedures to
take advantage of
the processing power of the server and be shared amongst all users
thereby reducing memory requirements.
- Portability - it runs on every platform
Oracle runs on and code written on one platform requires no changes to
run on any other (this is handled by the database).
- SQL statements can be embedded directly in the
code including transaction control and data manipulation statements.
All the SQL functions, operators and pseudo-columns can also be used
and the language provides full control of cursors.
What Features Does The Language Provide?
Whilst not an object-oriented language in the same vein as Java, it
does provide features like data hiding, encapsulation, collection types
and exception handling and supports the use of objects.
Also
provided are library routines for reading/writing files, write output
to a screen, display output on a web page and to communicate with other
processes and web and email servers. Examples of
these features are available here.
In short, it is the ideal language for use with Oracle databases and
can also be used in Forms and Reports to provide additional data
verification and other logic.
Its
only potential disadvantage is that it's proprietary to Oracle. This is
not a significant disadvantage unless you plan to migrate to a
different database supplier or need to build code that is database
independent.
For an
introduction
to the language including its features, data types
and use of the language see our tutorial.
See our PLSQL examples for examples of using features such
as cursors, records and loops.
Or learn about pl/sql procedures and functions by clicking on the appropriate link.
Full details of syntax and usage
are provided by the OracleŽ Database PL/SQL User's Guide and
Reference available from the Oracle Technology
Network.

|
|