| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Expressing SQL in relational algebra
> > How can I express "John likes Mary" using relational algrebra using
> > only "John", "likes", "Mary", intersection operator(^) and grouping
> > operators ("()")? The expression should not find "Mary likes John",
> > "like John Mary", etc. Would the following expression be correct:
> > (((John ^ John) ^ likes) ^ Mary)
>
> One would express "John likes Mary" using a tuple.
Ok, now I see that is not really a problem about constraining order as
much identifying how each part of a thing functions. Thus "John likes
Mary" could be expressed as
"((John^subject)^(likes^verb)^(Mary^object))" where the order of
things within a set of parenthesis is irrelevant. And the query "Who
likes Mary?" could be of the form
"((?^subject)^(like^verb)^(Mary^object))". Note the image at
www.xdb1.com/Detail.asp uses spaces instead of ^ to indicate the
intersection operation and an extra set of parenthesis around things
to distinguish them from their names.
Received on Wed Apr 09 2003 - 14:35:43 CDT
![]() |
![]() |