Re: Expressing SQL in relational algebra

From: Neo <neo55592_at_hotmail.com>
Date: 9 Apr 2003 12:35:43 -0700
Message-ID: <4b45d3ad.0304091135.1a052375_at_posting.google.com>


> > 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 - 21:35:43 CEST

Original text of this message