Your browser does not support JavaScript. This help page requires JavaScript to render correctly. About DDL Statements and Schema Object Dependencies
Skip Headers
Previous
Previous
 
Next
Next

About DDL Statements and Schema Object Dependencies

When you run your installation script files, their DDL statements create the schema objects of your application in the deployment environment. To create the installation script files correctly and run them in the correct order, you must understand the dependencies between the schema objects of your application.

If the definition of object A references object B, then A depends on B. Therefore, you must create B before you create A. Otherwise, the statement that creates B either fails or creates B in an invalid state, depending on the object type.

Typically, you install schema objects and data in the deployment environment in this order:

  1. Package specifications

  2. Tables (with constraints and indexes) in correct order

  3. Sequences (often used by triggers)

  4. Triggers

  5. Synonyms

  6. Views (which might reference functions, procedures, or synonyms)

  7. Package bodies

  8. Data

However, for a complex application, the order for creating the objects is rarely obvious. Usually, you must consult the database designer or a diagram of the design.

Related Topics

Oracle Database Advanced Application Developer's Guide

About Data Definition Language (DDL) Statements

About Installation Script Files