Advantages of packages, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Advantages of packages

Fetching across commits, Fetching Across Commits The FOR UPDATE clause...

Fetching Across Commits The FOR UPDATE clauses acquire exclusive all row locks. All rows are locked when you open the cursor, and when you commit your transaction they are unl

Update statement - syntax, UPDATE Statement   The UPDATE statement tra...

UPDATE Statement   The UPDATE statement transforms the values of the specified columns in one or more rows in the table or view. Syntax:

Providing results of queries, Providing Results of Queries Expressing ...

Providing Results of Queries Expressing queries in SQL is the (big) subject. Here I present just a simple example to give you the flavour of things to come in those chapters.

Declaring subprograms, Declaring Subprograms   You can declare subprog...

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

Synonyms- naming conventions, Synonyms You can create the synonyms to pr...

Synonyms You can create the synonyms to provide location transparency for the remote schema objects like tables, views, sequences, stand-alone subprograms, and packages. Though,

Using host arrays - bulk bind performance improvement, Using Host Arrays ...

Using Host Arrays The Client-side programs can use anonymous PL/SQL blocks to bulk-bind input and output host arrays. However, this is the well-organized way to pass the colle

Varrays versus nested tables, Varrays versus Nested Tables The Nested ta...

Varrays versus Nested Tables The Nested tables are differing from varrays in the following ways: 1)  Varrays have a maximum size, while nested tables do not. 2)  Varrays are

Creating a sql file, Creating a SQL file 1. Open a new file in Notepad...

Creating a SQL file 1. Open a new file in Notepad++ and save it to the location c:\mysql\bin, with the name lab8script.sql (the file extension should be .sql ). Add a MySQL co

Do you know anyone that can do this type of coding or not?, Task 2 [12 mark...

Task 2 [12 marks] Write the package body for the following package specification (the detailed description of each function and procedure is provided in the appendix below). Place

Maintain an audit trail of product table changes, The accuracy of product t...

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

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd