Home arrow Oracle arrow Page 2 - Oracle PL/SQL Subprograms

Subprogram Advantages and Disadvantages - Oracle

PL/SQL subprograms can be thought of as shortcuts that help you to perform certain kinds of Oracle queries less painfully as your applications increase in size and complexity. Keep reading to learn how you can use them to make your programming life a little easier. This article is excerpted from chapter 36 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 1590597702).

TABLE OF CONTENTS:
  1. Oracle PL/SQL Subprograms
  2. Subprogram Advantages and Disadvantages
By: Apress Publishing
Rating: starstarstarstarstar / 3
March 03, 2011

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Subprogram Advantages

Subprograms have a number of advantages, the most prominent of which are highlighted here:

  1. Consistency: When multiple applications written in different languages are performing the same database tasks, consolidating these like functions within subprograms decreases otherwise redundant development processes.
  2. Performance: A competent database administrator often is the most knowledgeable member of the team regarding how to write optimized queries. Therefore, it may make sense to leave the creation of particularly complex database-related operations to this individual by maintaining them as subprograms. 
     
  3. Security: When working in particularly sensitive environments such as finance, health care, and defense, itís sometimes mandated that access to data is severely restricted. Using subprograms is a great way to ensure that developers have access only to the information necessary to carry out their tasks. 
     
  4. Architecture: Although itís out of the scope of this book to discuss the advantages of multitier architectures, using subprograms in conjunction with a data layer can further facilitate manageability of large applications. Search the Web for n-tier architecture for more information about this topic.

Subprogram Disadvantages

Although the preceding advantages may have you convinced that subprograms are the way to go, take a moment to ponder the following drawbacks: 

  1. Performance: Many would argue that the sole purpose of a database is to store data and maintain data relationships, not to execute code that could otherwise be executed by the application. In addition to detracting from what many consider the databaseís sole role, executing such logic within the database will consume additional processor and memory resources. 
     
  2. Maintainability: Although you can use GUI-based utilities such as SQL Developer (see Chapter 29) to manage subprograms, coding and debugging them is considerably more difficult than writing PHP-based functions using a capable IDE. 
     
  3. Portability: Because subprograms often use database-specific syntax (e.g., PL/SQL code is not easily ported to DB2 or SQL Server), portability issues will surely arise should you need to use the application in conjunction with another database product.

Even after reviewing the advantages and disadvantages, you may still be wondering whether subprograms are for you. Perhaps the best advice is to read on and experiment with the numerous examples provided throughout this chapter and see where you can leverage PL/SQL in your applications.

Please check back next week for the continuation of this article.



 
 
>>> More Oracle Articles          >>> More By Apress Publishing
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ORACLE ARTICLES

- Oracle Java Security Woes Continue
- Oracle's New IaaS Cloud Option: There's a Ca...
- Oracle Acquires Eloqua to Boost Cloud Presen...
- Choosing Innovation: Oracle Survey Insights
- Oracle Fixes Privilege Escalation Bug
- Oracle`s Communications Service Availability...
- Oracle Releases Exalytics, Taleo Plans
- Oracle Releases Communications Network Integ...
- Oracle Releases Communications Data Model 11...
- Oracle Releases PeopleSoft PeopleTools 8.52
- Oracle Integrates Cloudera Apache Distro, My...
- Oracle Releases MySQL 5.5.18
- Oracle Announces NoSQL Database Availability
- Sorting Database Columns With the SELECT Sta...
- Retrieving Table Data with the LIKE Operator

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: