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.
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.
CREATE TABLE employee
(
empno INTEGER NOT NULL PRIMARY KEY,
ename CHAR (30) NOT NULL,
deptno INTEGER NOT NULL,
mgr_code INTEGER REFERENCES employee(empno)
) ;