In part 1 of this PLSQL tutorial, we had a quick look at what you can do with PL/SQL and some of the language features. Now let's explore some of the benefits of PL/SQL for developers and the types of applications to which PL/SQL is most suited.
By using PL/SQL you gain greater control over the processing of data queried from, or being entered into the database and as PL/SQL is also built into the Oracle Developer Suite (Oracle Forms & Reports), you use it in these tools to provide more control over the user interface and the display of results.
PL/SQL stored procedures are also ideal for implementing complex business logic and keeping this logic out of the user interface. This enables you to have a multi-tier system comprising of the user interface (the front end), a mid-tier containing the business logic and the actual data in the 3rd tier in the database, although this would be physically implemented in 2 tiers as the data and stored procedures are both in the database, or just 1 tier if the database and the front-end both reside on the same physical machine.
Of course there are many other technologies you could use to provide the user-interface and/or implement the business logic such as C# or Java but none of these has the tight coupling with the database of PL/SQL.
We've looked at the why, so let's consider the when
There are 3 conditions when PL/SQL is most suitable:
Looking for expert Oracle PLSQL training? Contact our partner Smartsoft for Oracle PLSQL training in the UK