Links Initiated By A Where Clause; How Enform Handles A Where Clause - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

LINKS and the LINK OPTIONAL Statement Rules
How ENFORM Defines a LINK
Links Initiated By
a WHERE Clause
C–2
the following is true of the logical records built for the link:
A given apple record occurrence appears in the logical records even if its linking
field value does not match a linking field value in an orange record occurrence.
Thus, an apple record occurrence does not depend on an orange record
occurrence.
A given orange record occurrence appears in the logical records only if its linking
field value matches the linking field value of an apple record occurrence. Thus, an
orange record occurrence depends upon an apple record occurrence.
A one-directional link established by the LINK OPTIONAL statement can be sketched
as follows:
record-description-1
where the arrow head points at the dependent record description.
A link initiated by a WHERE clause is a two-directional link. Before you can fully
understand when a WHERE clause establishes a link, you must first understand what
ENFORM does when a WHERE clause appears in a query.

How ENFORM Handles a WHERE Clause

When you use a WHERE clause, ENFORM converts the WHERE clause into
conjunctive normal form. This means that ENFORM takes the logical expression in the
WHERE clause and converts it into one or more "terms." Each term consists of a
logical expression that is connected to another logical expression by the boolean
operator AND. For example, consider the WHERE clause in the following query:
OPEN fruit, peach;
LIST BY fruit.color, peach.variety;
WHERE fruit.fuzz = peach.fuzz;
The logical expression in this WHERE clause is already in conjunctive normal form.
The single term in this WHERE clause is:
fruit.fuzz = peach.fuzz
Each "term" in a WHERE clause can contain "subterms" connected by the boolean
operator OR. For example, consider the WHERE clause in the following query:
OPEN fruit, peach;
LIST ...
WHERE fruit.fuzz = peach.fuzz
OR fruit.color = "ORANGE";
The logical expression in this WHERE clause is also in conjunctive normal form. The
single term in this WHERE clause is:
fruit.fuzz = peach.fuzz OR fruit.color = "ORANGE"
058057 Tandem Computers Incorporated
record-description-2
one term
one term

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents