Re: What to call this operator?

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Sat, 2 Jul 2005 11:19:33 +0200
Message-ID: <MPG.1d307a8f63d6d9419896c7_at_news.ntnu.no>


In article <1120241302.905254.255280_at_z14g2000cwz.googlegroups.com>, mikharakiri_nospaum_at_yahoo.com says...
> Jon Heggland wrote:
> > Yes, but the relation predicate is not. Given relations A(x,y) and B
> > (y,z) with predicates PA(x,y) "employee x works in department y" and PB
> > (y,z) "department y is led by manager z".
>
> Although you made an excellent point later, here I'm confused by the
> lack of quantifiers in the above sentences. Wouldn't it be more
> precisely to say
>
> "there exists employee x and department y such that x works in y"
> "there exists department y and manager z such that y is led by z"
>
> Predicate logic sentences without quantifiers are assumed to have
> implicit universal quantifier, right?

Perhaps in general, but not when used as relation/relvar predicates. Then the point is that they are open, and that each variable corresponds to a relation attribute. The tuples in the relation then represent the variable bindings that makes the predicate evaluate to true.

> > The predicate PJAB(x,y,z) of A join B is "employee x works in department
> > y, and department y is led by manager z" (or more simply, "employee x
> > works in department y which is led by manager z").
>
> "there exists employee x and department y such that x works in y
> AND
> there exists department y and manager z such that y is led by z"

No, because this predicate has no free variables, while the relation PJAB(x,y,z) has three attributes. Your predicate corresponds to the projection of PJAB on no attributes ((A JOIN B) {} in tutorial D syntax), which will evaluate to either TABLE_DEE (the relation with no attributes and one tuple) if your proposition is true, and TABLE_DUM (the relation with no attributes and no tuples) if it is false.

> It looks like the way we choose free variable is an interpretation made
> outside of logic, and both sentences are logically equivalent.

No, each attribute of the result must correspond to a free variable.

But of course, PUAB is logically equivalent to POAB { y } (I.e. the projection of POAB over y).

-- 
Jon
Received on Sat Jul 02 2005 - 11:19:33 CEST

Original text of this message