ENFORM Reference Manual
How ENFORM Defines a LINK
LINKS and the LINK OPTIONAL Statement Rules
058057 Tandem Computers Incorporated C–5
Links Due to the Transitive
Property of Links
The transitive property of links applies to both two-directional and one-directional
links. For two-directional links, the transitive property is defined as:
If A is linked to X and B is linked to X, then A is linked to B and B is linked to A.
For one-directional links, A is linked to B if:
A is optionally linked to X and X is linked to B.
A is linked to X and X is optionally linked to B.
A is optionally linked to X and X is optionally linked to B.
B is not, however, linked to A.
Consider the two-directional links in the following query specifications:
OPEN apple, orange, banana, pear;
LINK apple TO orange VIA seeds;
LINK orange TO banana VIA skin;
LIST ...
WHERE banana.color = pear.color;
A sketch of the explicit links in these specifications appears as follows:
orange
apple
pear
banana
The following sketch shows the preceding explicit links and the implicit links that exist
due to the transitive property of links:
orange
apple
pear
banana
The following query specifications contain both one-directional links and two-
directional links:
OPEN apple, orange, banana, pear;
LINK apple TO OPTIONAL orange VIA seeds;
LINK orange TO banana VIA skins;
LIST ...
WHERE banana.color = pear.color;