Creating and Editing Offline Constraint Definitions

Create or edit a primary, foreign or unique key, or a check constraint for an offline table definition. You can:

You can also create a new foreign key between modeled tables on a database diagram. See Getting Started with Database Modeling.

To create or edit a constraint definition using the dialog:

  1. In the navigator, expand the workspace, project and schema.
  2. Expand Tables, and open the Edit Offline Table dialog:
  3. Select Primary Key Information, Unique Constraints Information, Foreign Key Information, Check Constraint Information to display information about existing constraints.
  4. Click Add Column to add a new constraint, and enter properties for it. For information about how to fill these in values, click Help in the dialog.
  5. Click OK to save your changes.

Alternatively, you can edit constraint definitions directly on the diagram.

To edit a constraint definition on the diagram:

  1. In the constraint compartment (the third compartment on a modeled table), select the constraint definition you want to edit. Click once to select the right place, then click again to enter edit mode. You may need to resize the table definition to see the constraint.
  2. To edit an existing constraint, type your changes into the selected line. The information displayed depends on the type of constraint. The following illustration shows a primary key, a unique key and some check constraints. The check constraint EMP_SALARY_MIN is highlighted and the minimum salary has been changed to 10.
    Described in the text
    Use the following formats:
  3. When you press Enter or click elsewhere on the diagram the constraint is updated.

Creating New Offline Database Definitions
Working with Offline Database Definitions

 

Copyright © 1997, 2004, Oracle. All rights reserved.