Documentation
 
 
 

16.2. Advantages

What are the benefits of using packages over standalone procedures and functions? There are several benefits associated. Some of which are listed below:

  • Packages allow us to hide the portions of SQL code from general users. It is up to the package developer to decide, which package elements are declared public and can be referenced from outside the package and which package elements are to be declared as private and should remain hidden.

  • Although SPL is not an object oriented language, packages allow you the ability to follow object oriented design to a certain level. Packages give developers greater control over how the modules and data structures within them can be accessed.

  • Can contain global variables and cursors which are available to all the functions and procedures in the package.

  • Enables EnterpriseDB to read multiple package objects within memory.

  • Lets you organize your application development in an organized and effective manner.

  • Lets you overload the procedures and functions. Overloading means that we can create multiple procedures with same name within a package, each taking arguments of different numbers or datatypes.

 
 ©2004-2007 EnterpriseDB All Rights Reserved