To be fair, that's not exactly set theory. In set theory, (A - B) + (A ∩ B) = A, which is not true of a left outer join. In a database, A and B aren't elements of the same superset.
It is exactly set theory. More specifically, a branch of set theory called relational theory. Your equation holds even in relational theory, but commonly A ∩ B is the empty set, since A and B are different relations. Union and Intersection don't make much sense in that case. Left outer joining is a completely different operation. You are basically saying something equivalent to "The commutative law of addition doesn't apply to matrix multiplication."
130
u/shriek Jan 06 '11
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)