Re: Interpretation of Relations

From: vc <boston103_at_hotmail.com>
Date: 23 Jan 2007 07:36:51 -0800
Message-ID: <1169566611.595716.21710_at_l53g2000cwa.googlegroups.com>


paul c <toledobythesea_at_oohay.ac> wrote in news:bipth.793272$R63.169668_at_pd7urf1no:

> vc wrote:
>> Joe Thurbon wrote:
>>
>>>Depending on how you interpret relations into predicates, I would say
>>>that JOIN and PROJECT are kinds of inferencing rules. But they seem
>>>quite different to modus ponens.
>>
>>
>> They have got nothing to do with modus ponens and certainly are not
>> inference rules.
>>
>> The simplest way to see that RA is a subset of FOL is to rewrite RA
>> expressions as Horn clauses:
>>
>> Natural join: nj(X,Y,Z) <- r1(X,Y), r2(Y,Z).
>
> Doesn't this let us infer that there is a relation between X and Z and
> another between X and Y?

What do you mean by " a relation between X and Z" ? X,Y,Z are just variables. In the above, you do not need the clause "head" to formulate the query. You can just say r1(X,Y),r2(X,Z). Is it more understandable ?

>
>> Projection: proj(X) <- r1(X, Y).
>
> Doesn't this let us infer that there is a relation between X and some Y?

As before, you can just say r1(X, _).

>
>> Selection: sel(X,Y) <- r1(X, 123).
>
> I don't get this one, usually I think of selection based on natural join

All rows from r1 such that Y=123. Similar to e.g. the 'likes(X,Y)' predicate. Who likes John: likes(X, John). Or 'divisible(X, 7)' or whatever.

> as in http://www.dcs.warwick.ac.uk/~hugh/TTM/APPXA.pdf

You can, it's a matter of taste and perhaps efficiency. r1(X, 123) looks simpler than r1(X,Y),p_123(Y) plus the assumption that p_123(123) has been asserted, temporarily, in the fact database. Received on Tue Jan 23 2007 - 16:36:51 CET

Original text of this message