Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Grammatical Inconsistencies
[...It's morning all right]
> Are you willing to bother showing me an example of the use of a join within
> the relational theory framework where it is not the same as the
> cross-product -- or pointing me to some such example? I suppose I'm pushing
> my luck, eh?
> --dawn
Let us have the sets A, B, and C, where A = {1, 2, 3, 4} and B =
{chicken, cat, dog, cow}.
Let relation F be a subset of the cartesian product of sets A and B,
that is F is a subset of A x B, such as {(1, chicken), (2, cat), (3,
dog), (4, cow)}.
Let relation G be a subset of the cartesian product of C and no other
sets, such that C = {(1), (4)}.
If relation F was the predicate `Animals I own', and relation G was
the unary predicate `Animals of which I own I like to eat', the notion
of `I like to eat 1' does not make any sense. If we define G.C as a
subset of F.A (that is a fairly good definition of FOREIGN KEY, btw),
we are on the right track, but still not finished. We would like the
phrase `I like to eat chicken' in place of `I like to eat 1'.
The most obvious solution is to perform a join of some sort against
relations F and G, and by doing so we are concerned with the
_INTERSECTION_ between sets A and C (specifically sets F.A and G.C),
and then performing a projection of relation F.
This is no doubt the source of confusion in the matter. We join
relations by performing an intersection, union, or symetric difference
on attributes (read: sets) of those relations and performing a
projection on the relations in question.
I have, on occasion, suggested to someone `Intersect relations A and B via relation C' (which may have amplified this obviously confusing matter), in an informal instruction of how to solve for many-to-many relationships between relations A and B. It is not the relations themselves, per sé, which are being intersected, but the sets (specifically the keys) which are in consideration.
Just as I `nit-picked' you, Leffler will no doubt `nit-pick' me. I consider this a _welcome_ event and look forward to it an opportunity for any needed correction.
Do yourself a favour and read the Grimaldi's book,
Timothy J. Bruce
uniblab_at_hotmail.com
</RANT>
Received on Fri Apr 23 2004 - 12:42:28 CDT