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
Calling Constructors: The Calls to a constructor are allowed wherever the function calls are allowed. Similarly to the functions, a constructor is called as a section of an ex

Authorisations - Privileges As relational theory is silent on the issue of authorisation, it offers nothing with which SQL's vast edifice in support of what it calls privilege

Passing Cursor Parameters You use the OPEN statement to pass the parameters to a cursor. Unless you want to accept the default values, each proper parameter in the cursor decl

LONG and LONG RAW You use the LONG datatype to store the variable-length character strings. The LONG datatype is such as the VARCHAR2 datatype, except that the maximum length o

Using Subqueries A subquery is a query (typically enclosed by parentheses) that appears within another SQL data manipulation statement. If evaluated, the subquery gives a va

Anatomy of a Command Figure, showing a simple SQL command, is almost identical to its counterpart in the theory book. The only difference arises from the fact that SQL uses a

Application to Export Excel Data to MSSQL Server table I am having a table available in excel format and features the subsequent: - Some text is in Arabic (e.g. UTF-8 encodin

OUT Mode An OUT parameter returns values to the caller of a subprogram. Within the subprogram, an OUT parameter act like a variable. That means that you can use an OUT formal

Parameter SELF in pl/sql The MEMBER methods recognize a built-in parameter named SELF that is an instance of the object type. Whether declared explicitly or implicitly, it is

Using Savepoints The scope of the savepoint is a transaction in which it is defined. The Savepoints defined in the major transaction are not related to the savepoints defined