save up to 40%

What are the guidelines for creating a package?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What are the guidelines for creating a package?

Rating:

Oracle recommends using the following guidelines when creating a package:

  • Keep the package as general as possible so that it can be reused in future applications. Also, avoid writing a package that duplicates features provided by Oracle server.

  • Define the package specification before defining the package body, as the package specification reflects the design of the application.

  • The package specification should contain only those constructs that are required to be public, i.e., those constructs that must be visible to users of the package. In this way, other developers cannot misuse the package by basing their code on irrelevant details.

  • Place items in the declaration part of the package body when the items are required to be maintained throughout a session or across transactions. For example, declare a variable called NUMBER_EMPLOYED as a private variable (in the declaration part of the package body) if each call to a procedure that uses the NUMBER_EMPLOYED variable needs to be maintained.

  • Changes to the package body do not require recompilation of dependent constructs, whereas changes to the package specification require recompilation of every stored subprogram that references the package. Hence, in order to reduce the need for recompiling when code is changed, constructs should be placed as few as possible in a package specification.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.