Review Of Rules For The Link Optional Statement - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

LINKS and the LINK OPTIONAL Statement Rules

Review of Rules for the LINK OPTIONAL Statement

Review of Rules for
the LINK OPTIONAL
Statement
C–6
Under the transitive property of links, apple is linked optionally to orange, banana,
and pear. Orange, banana, and pear are linked to each other. These links could be
symbolically represented as:
apple
banana
Note that apple is linked to orange, banana, and pear; but orange, banana, and pear
are not linked to apple.
ENFORM uses the following rules to determine the legality of links when your query
specifications contain LINK OPTIONAL statements.
1.
A record description on the right side of a LINK OPTIONAL statement must not
be linked back to the record description on the left side of the same LINK
OPTIONAL statement.
ENFORM requires you to adhere to this rule because a LINK OPTIONAL
statement is a one-directional link. When you adhere to this rule, ENFORM has a
"starting place" from which to begin building the logical record occurrences. If
ENFORM did not require adherence to this rule, the "starting place" could be
ambiguous due to the transitive property of links.
2.
A given record description must not appear on the right side of more than one
LINK OPTIONAL statement. A record description appears on the right side of
more than one LINK OPTIONAL statement when you:
specify the same record description on the right side of two or more LINK
OPTIONAL statements.
specify a two-directional link between record descriptions that appear on the
right sides of two separate LINK OPTIONAL statements. (Note that a two-
directional link caused by the transitive property of links is also illegal.)
ENFORM requires adherence to this rule because the query processor cannot
support links that violate this rule.
When checking your queries for violations of these rules, ENFORM ignores any two-
directional links that reference the same two record descriptions referenced by a LINK
OPTIONAL statement. However, after ENFORM determines that all links are legal, it
uses all links when evaluating the rest of your query.
The following paragraphs describe links that violate these rules. These paragraphs
also describe some legal links that at first glance appear to violate these rules.
058057 Tandem Computers Incorporated
orange
pear

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents