1.2 Retrieved nulls have special logic to handle outer joins
In the course of executing a select query, the following rules are applied:
- Any selected attribute that is null does not bind its associated variable.
- Just before returning from the query any select variables that are still free are bound to {null}.
This is so we can handle outer joins. Consider this:
x :: [a-A] *== y :: [a-A]
Assume x.a binds A to a non-null value. If there is no matching row
in
y
, then y.a = null
. If variable A
was truly shared the query could never succeed. By not binding the
variable associated with y.a
the query can succeed ( rule
1) and A will be bound to the value in x.a
.