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

Integration of Procedural Constructs With SQL

PL/SQL provides three main advantages: 1) It integrates procedural constructs like control statements with SQL, allowing for better control over SQL statement execution. 2) It improves performance by allowing multiple SQL statements to be grouped and sent to the database server as a single program unit rather than individually. 3) Programs are portable as they can run on any Oracle server regardless of operating system or platform.

Uploaded by

Paras Gajipara
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Integration of Procedural Constructs With SQL

PL/SQL provides three main advantages: 1) It integrates procedural constructs like control statements with SQL, allowing for better control over SQL statement execution. 2) It improves performance by allowing multiple SQL statements to be grouped and sent to the database server as a single program unit rather than individually. 3) Programs are portable as they can run on any Oracle server regardless of operating system or platform.

Uploaded by

Paras Gajipara
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Integration of procedural constructs with SQL:

The most important advantage of PL/SQL is the integration of procedural constructs


with SQL. SQL is a nonprocedural language. When you issue a SQL command, your command
tells the database server what to do. However, you cannot specify how to do it. PL/SQL
integrates control statements and conditional statements with SQL, giving you better control
of your SQL statements and their execution. Earlier in this lesson, you saw an example of the
need for such integration.

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.

You might also like