Skip to main content
Vermont Solutions

Glossary · PL/SQL

PL/SQL — business logic in the database and migration

PL/SQL is Oracle's procedural language for stored procedures, functions, packages and triggers that run business logic inside the database. It performs well next to large data volumes, but concentrating logic in the database couples the institution to the Oracle engine (lock-in), raises licensing costs and makes automated testing and CI/CD harder. In banking and insurance it is one of the main sources of technical debt and a recurring driver of migrations to PostgreSQL or of extracting logic into a decoupled service layer.

Full content in Spanish. This English entry is a concise summary. The complete reference (including comparative tables, official sources and Vermont Solutions context) is available in the Spanish version: Read the full entry in Spanish →

Frequently asked

What is the difference between SQL and PL/SQL?

SQL is the declarative language to query and manipulate data. PL/SQL is Oracle's procedural extension that adds variables, control flow, exception handling and structures to package logic —procedures, functions, packages and triggers— and run it inside the database. PL/SQL calls SQL but adds the algorithmic layer that effectively turns the database into an application server.

Can PL/SQL be migrated to PostgreSQL?

Yes, but not one-to-one. PostgreSQL offers PL/pgSQL, with similar syntax, and tools such as ora2pg automate much of the schema and procedure conversion. Differences in types, packages, autonomous transactions and NULL behaviour require manual review and testing. The real effort is validating functional parity under load and deciding what logic to keep in the database and what to move out.

Should business logic stay in the database?

It depends. PL/SQL performs very well close to large data volumes, but concentrating logic in the database creates engine coupling, complicates versioning and testing, and limits horizontal scaling. The trend in modern banking is to keep in the database only what benefits from proximity to data and move business rules to a decoupled, versioned, automatically tested service layer.

How does PL/SQL relate to DORA and data sovereignty?

Dependence on a single proprietary engine is a concentration-risk factor that DORA asks institutions to manage through exit strategies and reversibility. Migrating part of the state to PostgreSQL —or another open engine— reduces that risk and opens sovereignty and multi-cloud options. It does not mean abandoning Oracle overnight: it means regaining the option to do so.

English summary maintained by Vermont Solutions. Citable with attribution. Regulation evolves — verify the latest version at the official source linked in the Spanish entry. Does not constitute legal advice.