62 Data Integrity with DB2 for z/OS
Cycle
A cycle is a path that connects a table to itself. The arrows in the path should all flow in the
same direction. The intervening DELETE, UPDATE, and implicit rules are irrelevant.
Three cycles are shown in the sample application in Figure 3-3 on page 58:
Two of these cycIes, DEPT and PROJ, are the results of self-referencing constraints.
The other one is the cycle between DEPT and EMP.
if the arrow for the relationship between DEPT and PROJ were in the opposite direction, then
there would be a third cycle for DEPT, a cycle for EMP, and a second cycle for PROJ.
Referential structure
A referential structure is a set of tables and relationships in which each table in the set is a
parent or dependent of itself or some other table in the set. A referential structure contains
descendents when there are more than two tables in the structure. Every table that is a parent
or dependent is part of exactly one referential structure. Figure 3-3 on page 58 represents a
single referential structure. Referential structures do not have names and are not referenced
in any statement. The concept is introduced to help explain terms that are used in the rules of
RI.
Table space set
A table space set is the set of table spaces that contains the tables of a single referential
structure. If two tables that belong to different referential structures share the same table
space, the table space set is the union of the table spaces that are part of the two referential
structures.
From the perspective of DB2 utilities, a table space set is a set of table spaces and partitions
that should be recovered together for one or both of these reasons:
Each of them contains a table that is a parent or descendent of a table in one of the others.
The set contains a base table and associated auxiliary tables.
Table space sets do not have names, however, because a table space cannot be a member
of more than one table space set. A table space set is uniquely identified by identifying any
member of the set. The only way that DB2 identifies the table spaces and tables within a table
space set is to specify it in the control statement of the REPORT utility, as described in
“REPORT utility” on page 87. Table space sets also have these characteristics:
Like referential structures, table space sets may include cycles. A table space cycle exists
when a table space contains tables that are descendents of itself. This can affect the use
of the LOAD utility as explained in “Loading tables involved in cycles” on page 94.
A table space set is a unit of consistency with respect to RI as described in 6.7, “DB2
subsystem restart after abend” on page 211.
3.3.2 Data definitions for RI
This section describes:
DDL extensions
Restrictions of defining referential structures and recommendations about circumventing
these restrictions

Get Data Integrity with DB2 for z/OS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.