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) |
Copyright (C) 2007. Sybase Inc. All rights reserved. |
![]() |