Handle cycles in referential integrity
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
A cycle exists when a series of primary-key-foreign-key relationships exists within a group of tables in a database.
Example: Table reference cycle
In the following example, the parts.distrib_no column
references the primary key of the distributor table,
and the distributor.part_no column references the
primary key of the parts table. Each of the tables references the
other, forming a cycle.
|
Example: Single-table reference cycle
A special case of the cycle in referential integrity occurs when a foreign key of a table references the primary key of the same table. The following example shows this single-table cycle.
|