0% found this document useful (0 votes)
19 views

Overview of PL/SQL

Uploaded by

Santosh Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Overview of PL/SQL

Uploaded by

Santosh Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 12

I

Overview of PL/SQL

Copyright © Oracle Corporation, 2001. All rights reserved.


Course
Course Objectives
Objectives

After
After completing
completing this
this course,
course, you
you should
should be
be able
able to
to
do
do the
the following:
following:
•• Describe
Describe the
the purpose
purpose of
of PL/SQL
PL/SQL
•• Describe
Describe the
the use
use of
of PL/SQL
PL/SQL for
for the
the developer
developer as
as
well
well as
as the
the DBA
DBA
•• Explain
Explain the
the benefits
benefits of
of PL/SQL
PL/SQL
•• Create,
Create, execute,
execute, and
and maintain
maintain procedures,
procedures,
functions,
functions, packages,
packages, and
and database
database triggers
triggers
•• Manage
Manage PL/SQL
PL/SQL subprograms
subprograms and
and triggers
triggers
•• Describe
Describe Oracle
Oracle supplied
supplied packages
packages
•• Manipulate
Manipulate large
large objects
objects (LOBs)
(LOBs)

I-2 Copyright © Oracle Corporation, 2001. All rights reserved.


About
About PL/SQL
PL/SQL

•• PL/SQL
PL/SQL is
is the
the procedural
procedural extension
extension to
to SQL
SQL with
with
design
design features
features of
of programming
programming languages.
languages.
•• Data
Data manipulation
manipulation and
and query
query statements
statements ofof SQL
SQL
are
are included
included within
within procedural
procedural units
units of
of code.
code.

I-3 Copyright © Oracle Corporation, 2001. All rights reserved.


PL/SQL
PL/SQL Environment
Environment

PL/SQL engine
PL/SQL Procedural
PL/SQL PL/SQL statement
block block SQL
executor

SQL statement executor

Oracle server

I-4 Copyright © Oracle Corporation, 2001. All rights reserved.


Benefits
Benefits of
of PL/SQL
PL/SQL

Integration
Integration

Application

Shared Oracle server


library

I-5 Copyright © Oracle Corporation, 2001. All rights reserved.


Benefits
Benefits of
of PL/SQL
PL/SQL

Improved
Improved performance
performance
SQL
SQL
Application Other DBMSs
SQL
SQL

SQL
IF...THEN
SQL Oracle with
Application ELSE PL/SQL
SQL
END IF;
SQL

I-6 Copyright © Oracle Corporation, 2001. All rights reserved.


Benefits
Benefits of
of PL/SQL
PL/SQL

Modularize
Modularize program
program development
development


DECLARE


BEGIN


EXCEPTION

END;

I-7 Copyright © Oracle Corporation, 2001. All rights reserved.


Benefits
Benefits of
of PL/SQL
PL/SQL

•• PL/SQL
PL/SQL is
is portable.
portable.
•• You
You can
can declare
declare variables.
variables.

I-8 Copyright © Oracle Corporation, 2001. All rights reserved.


Benefits
Benefits of
of PL/SQL
PL/SQL

•• You
You can
can program
program with
with procedural
procedural language
language control
control
structures.
structures.
•• PL/SQL
PL/SQL can
can handle
handle errors.
errors.

I-9 Copyright © Oracle Corporation, 2001. All rights reserved.


Benefits of Subprograms

• Easy maintenance
• Improved data security and integrity
• Improved performance
• Improved code clarity

I-10 Copyright © Oracle Corporation, 2001. All rights reserved.


Invoking Stored Procedures
and Functions

Scott LOG_EXECUTION
procedure
1 xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
2 vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
xxxxxxxxxxxxxx

xxxxxxxxxxxxxx
vvvvvvvvvvvvvv
3 vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
xxxxxxxxxxxxxx vvvvvvvvvvvvvv
Oracle Oracle Oracle vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
Portal Discoverer Forms vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
Developer vvvvvvvvvvvvvv
xxxxxxxxxxxxxx
vvvvvvvvvvvvvv

4
Scott

I-11 Copyright © Oracle Corporation, 2001. All rights reserved.


Summary
Summary
•• PL/SQL
PL/SQL isis an
an extension
extension to
to SQL.
SQL.
•• Blocks
Blocks of
of PL/SQL
PL/SQL code
code are
are passed
passed to
to and
and
processed
processed by by aa PL/SQL
PL/SQL engine.
engine.
•• Benefits
Benefits of
of PL/SQL:
PL/SQL:
–– Integration
Integration
–– Improved
Improved performance
performance
–– Portability
Portability
–– Modularity
Modularity of
of program
program development
development
•• Subprograms
Subprograms are
are named
named PL/SQL
PL/SQL blocks,
blocks, declared
declared
as
as either
either procedures
procedures or
or functions.
functions.
•• You
You can
can invoke
invoke subprograms
subprograms from
from different
different
environments.
environments.

I-12 Copyright © Oracle Corporation, 2001. All rights reserved.

You might also like