Database Reference
In-Depth Information
2.
If there is at least one pair of matching keys in both relations,
a natural join (if matching attribute names are identical) or an
equijoin (if matching attribute names have different names)
is preferred to a cross product. The match must be between a
foreign key (in the primary relation) and a primary key (in the
referenced relation).
3.
The Cartesian product, as defined in the relational model,
is associative. However its mathematical counterpart (from
which it is drawn) is not. The reason for this is partly due to
the fact that in the definition of a relation, no emphasis is
placed on the order of the attributes (review section 3.3.1).
7.3.5 Theta-Join
The Theta-join is presented in some texts as the general case of the JOIN operation. The
BNF form for the theta-join based on Ullman's notation is as follows:
The BNF form for the theta join based on Date's notation is as follows:
An alternate notation for representing this has been described by [Russell, 2006], and
is particularly clear; it is paraphrased below:
Incidentally, this latter notation is really a simplification of the Ullman notation, and
is fully reconcilable with either the Date or Ulman notation, bringing additional clarity to
the specification of the theta-join. This is illustrated in example 5b. Moreover, as you
will see in chapter 12, the ANSI version of the SQL join is comparable to this notation; we
will therefore refer to it as the ANSI join notation.
 
Search WWH ::




Custom Search