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
Assigning and Comparing Collections One collection can be assigned to other by an SELECT, INSERT, UPDATE, or FETCH statement, an assignment statement, or by a subprogram call. A

Parameter and Keyword Description: cursor_name: This identifies an explicit cursor formerly declared within the present scope. cursor_variable_name: These identif

Declaring Subprograms   You can declare subprograms in any PL/SQL subprogram, block, or package. But, you should declare subprograms at the end of the declarative part after a

Effect of Anonymous Columns Now, recall that a VALUES expression denotes a table with undefined column names. If an initial value is to be specified when a base table is creat

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Processing Transactions This part describes how to do the transaction processing. You learn the fundamental techniques that safeguard the consistency of your database, involvin

INSERT Statement The INSERT statement adds fresh rows of data to the specified database table or view. Syntax:

Implicit Cursor Attributes The Implicit cursor attributes returns the information about the execution of an INSERT, DELETE, UPDATE, or SELECT INTO statement. The cursor attribu

Recursion versus Iteration Dissimilar the iteration, recursion is not crucial to PL/SQL programming. Any problem which can be solved using recursion can be solving using the it

Enrolment was split - SQL Example shows how relvars IS_CALLED and IS_ENROLLED_ON can be derived from the original ENROLMENT relvar, using projection in the initial assignment