What is PL/SQL?

  1. PL/SQL stands for Procedural Language Extension to SQL
  2. It is a Extension of SQL developed by Oracle.
  3. It adds SQL capabilities of procedural programming like variables, loops and conditional statements in SQL.

PL/SQL Architecture

Physical Architecture

Image Description

  • PL/SQL engine processes the entire PL/SQL block of code.
  • It Separate SQL statements and Procedural statements.

Simple Architecture Flow

Image Description

PL/SQL Logical Architecture

  • Corporates with SQL Engine.
  • Enables Subprograms -> Allows re-usability of code/script like variables and functions.
  • Dynamic Queries-> We can modify or create new Queries.
  • Case Insensitivity
  • Optimizer-> It optimizes our code for better performance.
  • Enables Object-Oriented Programming
  • Web Development #Extras Context Switching: When you write SQL Query in PL/SQL the PL/SQL send the query to SQL Engine and the result will be returned this operation is called Context Switching.

Pluggable Database

Image Description