Creating a Database Package

You create a database package as follows:

  1. Select Model > Database Packages to open the List of Database Packages.
  2. Click the Add a Row tool to add a database package to the list, and then click the Properties tool to display its property sheet.
  3. Type a name and a code for the database package.
  4. [optional] Select an Owner and/or Privilege for the database package.
  5. Click OK to complete the creation of the database package.

A database package has the following properties:

Property

Description

Name

The name of the item which should be clear and meaningful, and should convey the item's purpose to non-technical users.

Code

The technical name of the item used for generating code or scripts, which may be abbreviated, and should not generally include spaces.

Comment

Additional information about the database package.

Stereotype

Sub-classification used to extend the semantics of an object without changing its structure; it can be predefined or user-defined.

Owner

Name of database package owner. You choose an owner from a list of users. A database package can only have one owner at a time.

Privilege

Lets you specify whether the functions and procedures in the database package execute with the privileges and in the schema of the user who owns it (definer), or with the privileges and in the schema of CURRENT_USER (invoker).

The following tabs are also available:


  • Procedures tab – Lists the procedures associated with the database package (see Database package procedures).

  • Variables tab - Lists the variables associated with the database package (see Database package variables).

  • Cursors tab - Lists the cursors associated with the database package (see Database package cursors).

  • Exceptions tab – Lists the exceptions associated with the database package (see Database package exceptions).

  • Types tab - Lists the types associated with the database package (see Database package types).

  • Initialization tab - Lets you define initialization code for the database package body. Typically initialization holds statements that initialize database package variables. Initialization takes place after database package creation and compilation in the server.