Oracle8i Supplied PL/SQL Packages Reference Release 2 (8.1.6) Part Number A76936-01 |
|
This reference manual describes the Oracle PL/SQL packages that are shipped with Oracle. Information in this manual applies to versions of the Oracle Server that run on all platforms unless otherwise specified.
See Also:
For information about Java packages, please refer to Oracle8i Supplied Java Packages Reference, |
This Preface includes the following sections:
A package is a schema object that groups logically related PL/SQL types, items, and subprograms. Packages usually have two parts: a specification and a body, although sometimes the body is unnecessary. The specification is the interface to your applications; it declares the types, variables, constants, exceptions, cursors, and subprograms available for use. The body fully defines cursors and subprograms, and so implements the specification.
Unlike subprograms, packages cannot be called, parameterized, or nested. Still, the format of a package is similar to that of a subprogram:
CREATE PACKAGE name AS -- specification (visible part) -- public type and item declarations -- subprogram specifications END [name]; CREATE PACKAGE BODY name AS -- body (hidden part) -- private type and item declarations -- subprogram bodies [BEGIN -- initialization statements] END [name];
The specification holds public declarations that are visible to your application. The body holds implementation details and private declarations that are hidden from your application.
You can debug, enhance, or replace a package body without changing the interface (package specification) to the package body.
To create packages and store them permanently in an Oracle database, use the CREATE
PACKAGE
and CREATE
PACKAGE
BODY
statements. You can execute these statements interactively from SQL*Plus or Enterprise Manager.
Only the declarations in the package specification are visible and accessible to applications. Implementation details in the package body are hidden and inaccessible. So, you can change the body (implementation) without having to recompile calling programs.
The advantages of using packages include modularity, ease of application design, information hiding, added functionality, and improved performance.
There are two sub-releases within Oracle8i, 8.1.5 and 8.1.6.
This book was new for release 8.1.5.
There are five new packages:
Oracle enhanced the following packages:
This manual is intended for anyone using or interested in Oracle packages. This book is also valuable to systems analysts, project managers, and others interested in the development and tuning of database applications.
This manual assumes you have a working knowledge of application programming and that you are familiar with the use of Structured Query Language (SQL) to access information in relational database systems.
Certain sections of this manual also assume a knowledge of the basic concepts of object oriented programming.
For more information, see the following manuals in the Oracle8i documentation set:
The following conventions are used in this manual:
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|