When A Where Clause Establishes A Link - Tandem ENFORM 058057 Reference Manual

Data management library
Table of Contents

Advertisement

Note that what appears as a term in your WHERE clause might not be a term in a
converted WHERE clause. For example, consider the WHERE clause in the following
query:
OPEN fruit, orange, peach;
LIST fruit.color, orange.variety, peach.variety
WHERE (fruit.season = "summer" AND fruit.color
= orange.color) OR (fruit.season <> "spring" AND
fruit.fuzz = peach.fuzz);
ENFORM converts this WHERE clause into conjunctive normal form as follows:
fruit.season = "summer" OR fruit.season <> "spring"
AND
fruit.season = "summer" OR fruit.fuzz = peach.fuzz
AND
fruit.color = orange.color OR fruit.season <> "spring"
AND
fruit.color = orange.color OR fruit.fuzz = peach.fuzz

When a WHERE Clause Establishes a Link

A WHERE clause establishes a link when an AND term in the converted WHERE
clause references two or more record descriptions. For example, consider the WHERE
clause in the following query:
OPEN apple, fruit;
LIST ...
WHERE fruit.color = apple.color;
The converted form of this WHERE clause contains a single term:
fruit.color = apple.color;
Since this term references two record descriptions (fruit and apple), the preceding
WHERE clause establishes a two-directional link between fruit and apple.
The WHERE clause in the following query does not establish a link:
OPEN apple, banana;
LIST ...
WHERE apple.color = "RED"
AND banana.color = "YELLOW";
058057 Tandem Computers Incorporated
LINKS and the LINK OPTIONAL Statement Rules
How ENFORM Defines a LINK
C–3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enform

Table of Contents