Integration of Procedural Constructs With SQL
Integration of Procedural Constructs With SQL
Improved performance:
Without PL/SQL, you would not be able to logically combine SQL statements as one
unit. If you have designed an application that contains forms, you may have many different
forms with fields in each form. When a form submits data, you may have to execute a number
of SQL statements. SQL statements are sent to the database one at a time. This results in many
network trips and one call to the database for each SQL statement, thereby increasing network
traffic and reducing performance (especially in a client/server model).
With PL/SQL, you can combine all these SQL statements into a single program unit.
The application can send the entire block to the database instead of sending the SQL statements
one at a time. This significantly reduces the number of database calls. As the slide illustrates,
if the application is SQL intensive, you can use PL/SQL blocks to group SQL statements before
sending them to the Oracle database server for execution.
Portability:
PL/SQL programs can run anywhere an Oracle Server runs, irrespective of the
operating system and platform. You do not need to customize them to each new environment.
You can write portable program packages and create libraries that can be reused in different
environments.
Exception handling:
PL/SQL enables you to handle exceptions efficiently. You can define separate blocks
for dealing with exceptions. You learn more about exception handling in the lesson titled
“Handling Exceptions.”
PL/SQL shares the same data type system as SQL (with some extensions) and uses the
same expression syntax.
Portability:
PL/SQL programs can run anywhere an Oracle Server runs, irrespective of the
operating system and platform. You do not need to customize them to each new environment.
You can write portable program packages and create libraries that can be reused in different
environments.
Exception handling:
PL/SQL enables you to handle exceptions efficiently. You can define separate blocks
for dealing with exceptions. You learn more about exception handling in the lesson titled
“Handling Exceptions.”
PL/SQL shares the same data type system as SQL (with some extensions) and uses the
same expression syntax.
Portability:
PL/SQL programs can run anywhere an Oracle Server runs, irrespective of the
operating system and platform. You do not need to customize them to each new environment.
You can write portable program packages and create libraries that can be reused in different
environments.
Exception handling:
PL/SQL enables you to handle exceptions efficiently. You can define separate blocks
for dealing with exceptions. You learn more about exception handling in the lesson titled
“Handling Exceptions.”
PL/SQL shares the same data type system as SQL (with some extensions) and uses the
same expression syntax.
Portability:
PL/SQL programs can run anywhere an Oracle Server runs, irrespective of the
operating system and platform. You do not need to customize them to each new environment.
You can write portable program packages and create libraries that can be reused in different
environments.
Exception handling:
PL/SQL enables you to handle exceptions efficiently. You can define separate blocks
for dealing with exceptions. You learn more about exception handling in the lesson titled
“Handling Exceptions.”
PL/SQL shares the same data type system as SQL (with some extensions) and uses the
same expression syntax.