Thursday, 10 March 2016

PL/SQL

PL/SQL is used for "Thick Database Paradigm". let's go into deep understanding of the thick database paradigm. if an application is using oracle database and the data is not persisted, then the application is worthless. in order to persist the data, first the implementation details for persisting the data has to be hidden like tables and queries that operate on the data to persist. hiding such implementation details is said to be "Thick Database Paradigm"  approach.

Why it is thick?

Here is the answer , the PL/SQL blocks contains the queries as the code to operate on the data, these queries are written in the form of code such that the data can be changed and viewed  through the PL/SQL blocks. here the PL/SQL block acts as an interface(a medium or a bridge) and hiding the implementation details such has queries and tables. this is same as the approach used in programming. In programming there is a functionality hidden by a interface, only interface is exposed but not the actual implementation of functional details. here also same case, applying the OOPS concept such that the data is persisted, implementation details like tables and queries are hidden by PL/SQL where PL/SQL is acting like an interface. Here the SQL query fired from a PL/SQL block is treated as a special program.

On certain point of view it is possible to write applications only on the top of  SQL is possible that is without using PL/SQL. but using PL/SQL has a few advantages. some of them are listed below:
1. Integration with SQL
2. network traffic reduction.
3. increase in performance.
4. portability.

Conclusion: 
   PL/SQL combines the data manipulating power of SQL with the data processing power of procedural languages.

No comments:

Post a Comment