Advantages of packages, PL-SQL Programming

Advantages of Packages

The benefits of the Packages are as shown below:

Modularity

The Packages encapsulate logically associated items, types, and subprograms in the named PL/SQL module. Every package is easy to understand, & the interfaces between the packages are clear, simple, and well defined. This aids the application development.

Easier Application Design

When creating an application, all you require initially is the interface information in the package specification. You can code and gather the specification without its body. Then stored the subprograms that reference the package can be compiled as well. You need not define the package bodies completely until you are ready to complete the application.

Information Hiding

With the packages, you can state which items, types, and subprograms are public or private. For illustration, if a package has 4subprograms, 3 might be public and one private. The package hide the explanation of the classified subprogram so that only the package is affected if the definition changes. These simplify the maintenance & enhancement. Also, by hiding the implementation details from the users, you secure the integrity of the package.

Added Functionality

The Packaged public variables and cursors continue for the duration of the session. Therefore, they can be shared by all the subprograms which execute in the atmosphere. Also, they permit you to maintain the data across transactions without having to store it in the database.

Better Performance

When you call the packaged subprogram for the first time, the entire package is burdened into the memory. And hence, the later calls to correlated subprograms in the package need no disk I/O. Also, the packages stop cascading dependencies and thereby avoid needless recompiling. For illustration, if you change the definition of a packaged function, the Oracle need not recompile the calling subprograms as they do not depend on the package body.

Posted Date: 10/5/2012 5:59:21 AM | Location : United States







Related Discussions:- Advantages of packages, Assignment Help, Ask Question on Advantages of packages, Get Answer, Expert's Help, Advantages of packages Discussions

Write discussion on Advantages of packages
Your posts are moderated
Related Questions
Scope and Visibility The References to an identifier are resolved according to its visibility and scope. The scope of an identifier is that area of a program unit (subprogram, b

CHECK Constraints in SQL A CHECK constraint is a table constraint defined using the key word CHECK, as already illustrated in several examples in this chapter. In particular,

Using LIMIT For nested tables, that have no maximum size, the LIMIT returns NULL. For varrays, the LIMIT returns the maximum number of elements that a varray can have (that yo

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. T

Mixed Notation The fourth procedure call shows that you can mix the positional and named notation. In this situation, the first parameter uses the positional notation, & the s

THEORY OF BIOGENESIS - This theory explains that the existing living organisms originated from pre-existing living beings not from non living entities. This concept of or

I need to write one function and one procedure to query a Oracle 10.1 DB using PL SQL. I have the schema and exact queries...along with work Ive started and a template to put the a

Comparison Operators The Comparison operators can compare one expression to another. The outcome is always true, false, or null. Usually, you use a comparison operators in condi

Object Type: The object type is a user-defined composite datatype which encapsulates a data structure along with the functions and procedures required to manipulate the data

Declaring a Cursor The Forward references are not allowed in the PL/SQL. Therefore, you must declare a cursor before referencing it in other statements. Whenever you declare a