Chapter 3 Building Physical Diagrams


Defining referential integrity

You define referential integrity from the Integrity page of the reference property sheet.

Note   Implementing referential integrity
In PowerDesigner 6, the implementation of referential integrity was defined as a generation option. However, in PowerDesigner 8, you indicate the implementation of referential integrity using declarative referential integrity, or by the use of triggers, from the Integrity page of the reference property sheet.

Steps To define referential integrity:

  1. Double-click a reference in the diagram to display the reference property sheet.
  2. Click the Integrity tab.

    The Integrity page appears. If no constraint name has been defined, the default constraint name is shown in the Constraint name box.
  3. <optional> Type a constraint name.

    The User-Defined button at the end of the Constraint name box is automatically shown pressed, to indicate the name is user-defined.

    Note   Undo changes to a constraint name
    You can always return to the default constraint name by re-clicking the User-Defined button.

  4. Select Declarative from the Implementation dropdown listbox, if you want to implement declarative referential integrity.

    or

    Select Trigger from the Implementation dropdown listbox, if you want to implement referential integrity using triggers.
  5. Select values for Cardinality, Update Constraint and Delete Constraint.
  6. Select Mandatory Parent if you want each row in the child table to have a corresponding row in the parent table.
  7. Select Change Parent Allowed if you want to be able to update the foreign key value in the child table.
  8. Click OK.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.