
Substituting for T2 in the last statement gives:
TR = Column of [Join of T1, Telephone on roomNo]
T2
under extensionNo.
Now substitute for T1:
TR = Column of [Join of {Rows of Room where capacity = 1}
T1
, Telephone on
roomNo]
T2
under extensionNo.
The square and curly brackets, and subscripts T1 and T2, have been inserted in order
to make the correspondence between the nested and unnested versions clearer.
Normally, the nested version would be written simply as:
TR = Column of (Join of (Rows of Room where capacity = 1), Telephone on
roomNo) under extensionNo.
We will see in the following chapter that it is easier for a database management
system to optimise ...