Suppose we have three relations , , and , with all attributes declared as not null.
a. Give instances of relations ,, and such that in the result of

(r NATURAL LEFT OUTER JOIN s) NATURAL LEFT OUTER JOIN t

attribute C has a null value but attribute D has a non-null value.
b. Are there instances of , , and such that the result of

r NATURAL LEFT OUTER JOIN (s NATURAL LEFT OUTER JOIN t)

has a null value for but a non-null value for ? Explain why or why not.


a. Consider , , . The second expression would give .

b. Since s natural left outer join t is computed first, the absence of nulls in both s and t implies that each tuple of the result can have D null, but C can never be null.


Note: This imples that the the operation natural left outer join is NOT associative.