1: What is PL/SQL?
PL/SQL is an extension of the Structured Query Language (SQL) used in Oracle. Unlike SQL, PL/SQL allows programmers to write code in a procedural format. The full form of PL/SQL is a "language extension of SQL". Combining the data processing capabilities of SQL with the processing capabilities of procedural languages, super powerful SQL queries can be created. PL/SQL is meant to instruct the compiler "what to do" through SQL's procedural approach, and similar to other database languages, it gives the programmer more control through the use of loops, conditionals, and object-oriented concepts.
2: PL/SQL architecture
PL/SQL architecture mainly includes the following three components:
1.PL/SQL block
is the component with the actual PL/SQL code, which includes different parts for logically dividing the code, and the execution part for processing statements, and the exception handling part for handling errors. It also contains SQL instructions used to interact with the database server, all PL/SQL units are treated as PL/SQL blocks, which is the starting stage of the architecture as the main input.
2.PL/SQL engine
The PL/SQL engine is the component that actually processes the code.
The PL/SQL engine separates the PL/SQL unit and the SQL part in the input.
The separated PL/SQL unit will be processed by the PL/SQL engine itself.
The SQL part will be sent to the database server where the actual interaction with the database occurs.
Can be installed in database servers and application servers.
3. Database server
The database server is the most important component in the Pl/SQL unit that stores data.
The PL/SQL engine uses SQL in the PL/SQL unit to interact with the database server.
And is composed of SQL executor, which parses the input SQL statement and performs the same operation.
Three: Advantages of using PL/SQL
Better performance, because SQL is executed in batches instead of single statements
High productivity
Tightly integrated with SQL
Completely portable
Tight security
Supports object-oriented programming concepts.
The above is the introduction to what is PL/SQL? A complete introduction to the architecture of PL/SQL. If you want to know more about SQL tutorial, please pay attention to the php Chinese website.
The above is the detailed content of What is PL/SQL? What is the architecture of PL/SQL. For more information, please follow other related articles on the PHP Chinese website!