Chapter 3 Building Physical Diagrams
Referential integrity is a collection of rules that govern data consistency between primary keys, alternate keys and foreign keys. It dictates what happens when you update or delete a value in a referenced column in the parent table, and when you delete a row containing a referenced column from the parent table.
The Integrity tab contains the following properties:
Property | Description |
---|---|
Constraint name | Name of the referential integrity constraint. Maximum length is 254 characters |
Implementation | Specifies how referential integrity will be implemented. You can choose between:
|
Cardinality | Indicates the minimum and maximum number of instances in a child table permitted for each corresponding instance in the parent table. The following values are available by default:
Alternately, you can enter your own integer values in one of the following formats:
You can use * or n to represent no limit. Examples:
|
User-defined | Indicates a user-defined constraint name |
Update constraint | How updating a key value, in the parent table affects the foreign key value in the child table. Depending on the implementation and DBMS, you can choose between:
|
Delete constraint | How deleting a row in the parent table affects the child table |
Mandatory parent | Each foreign key value in the child table must have a corresponding key value, in the parent table |
Change parent allowed | A foreign key value can change to select another value in the referenced key in the parent table |
Check on commit | [Sybase SQL Anywhere 5.0 and 5.5 only] Verifies referential integrity only on the commit, instead of verifying it after row insertion. You can use this feature to control circular dependencies |
Cluster | Indicates whether the reference constraint is a clustered constraint (for those DBMS that support clustered indexes) |
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 tab of the reference property sheet.
Copyright (C) 2006. Sybase Inc. All rights reserved. |
![]() |