Chatta subito con l'assistenza
Chat con il supporto

SQL Navigator for Oracle 7.4 - Installation Notes

Constraint Editor

Use the Constraint Editor to specify table constraints.

About Constraints

In Oracle, a constraint is a rule applied to an object that restricts the data allowed in any instance of the object.

The characteristics and usage of this database object are described in the Oracle documentation.

 

Note:

  • SQL Navigator’s visual constraint editor is intended to be used only for table-related constraints.
  • Once a constraint has been defined and saved to the database, it cannot be altered in the constraint editor. To change the constraint it is necessary to drop it and then create a new constraint with the necessary properties. Use DB Navigator or Find objects Dialog to locate a constraint then Object Menu | Drop to drop the constraint.

 

Using The Editor

Steps To Create A Constraint

  1. Click Create a new constraint to open the New Constraint dialog.

    Field Description
    Parent Schema Select the parent schema for the new constraint.
    Parent Object Select the parent object (table) for the new constraint.
    Name Name the new constraint.

    Constraint Type

    Type Purpose
    Check Specifies a condition that each row in the table must satisfy
    Primary Key Designates a column or combination of columns as a table’s primary key
    Unique Designates a column or combination of columns as a table’s unique key
    Foreign Key Designates a column or combination of columns as the foreign key
  2. More on the Constraint Type.

    Type

    Action

    Check

    Enter the check condition following Oracle syntax conventions. Example: (loc is not null)

    Primary Key

    Designate the column(s) to be used as the Unique, Primary Key, or Foreign key.

    To add columns to the constraint, use the arrow button to move one or more selected columns from the Available Table Columns pane to the Constraint Columns pane. The double arrow adds all available columns to the constraint.

    Unique

    Foreign Key

  3. If the constraint type is Foreign key:
    • Designate the Unique or Primary Key in the Reference field.
    • If desired, select the On Delete Cascade property.

    Note: Before selecting the On Delete Cascade property, be sure you understand the potential consequences of using this option. It could result in lost data. Consult your Oracle documentation for information about the DELETE CASCADE command.

Now the constraint is defined

Icon Tool Tip Description

Generate SQL for changes

Extract the DDL for the new constraint and place it into the Code Editor.

Revert to previous constraint

Undo your entries without saving them.

After saving your changes, you will not be able to use the Revert command.

Apply changes to DB

Save your new constraint definition to the database. SQL Navigator generates the DDL and commits it to the database.

Enable current constraint

This duplicates Enable/Disable Constraint on the Object Menu.

 

Ways to Open The Constraint Editor

Icon Action Description

From the Main Menu

View Menu | Visual Object Editors | Constraint Editor

Open the Constraint Editor.

From DB Navigator or Find objects Dialog

Right click on a Constraint object and click Open.

Open the selected Constraint object in the Constraint Editor.

Related Documents

The document was helpful.

Seleziona valutazione

I easily found the information I needed.

Seleziona valutazione