Re: A different definition of MINUS, part 4

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Fri, 09 Jan 2009 14:59:00 -0400
Message-ID: <49679e85$0$5488$9a566e8b_at_news.aliant.net>



paul c wrote:

> Bob Badour wrote:
> ...
>

>>> can be got without Forall, as long as we have projection.  I gather 
>>> that 'full relation' often means a cartesian product.
>>
>>
>> Just a relation expressing all of what all is. In the suppliers/parts 
>> example, one might group parts from SP into a relation valued 
>> attribute and then compare that against the P relation projected on {P}
>>
>> I am unsure of the exact notation but something like:
>>
>> (SP{S,P} GROUP Parts{P} | Parts = P{P}){S}

>
> Excellent! It hadn`t occurred to me to use GROUP this way. Seems to
> take advantage of the way GROUP always implies a key or fd that might
> not have been present without GROUP.

As I said, I am unsure of the notation. Above, I more-or-less assumed that GROUP would create a relation valued attribute from some specified set of attributes while projecting on the remaining attributes, but one probably wants to group things other than attributes in a single relation, and one probably wants the option to project on an arbitrary set of attributes.

Ignoring those notation problems, though, I assume you see how that more-or-less expresses "Suppliers who supply all parts."

One could replace P{P} with any expression answering "All of what?" For example, "Suppliers who supply all the green parts." might be:

(SP{S,P} GROUP Parts{P} | Parts = (P | COLOR='green'){P}){S}

assuming the P relation has a COLOR attribute and one of the possible values is 'green'.

I used the vertical bar for RESTRICT similar to set notation, which I generally read as "such that", and {} for PROJECT. Although, I have to say that as my eyes age, I like notations that use both () and {} less and less. Received on Fri Jan 09 2009 - 12:59:00 CST

Original text of this message