Re: About grammar and syntax on a possible relational language

From: Cimode <cimode_at_hotmail.com>
Date: Thu, 13 Mar 2008 14:27:30 -0700 (PDT)
Message-ID: <7d0328cf-708c-4d32-9eec-ec9b91011749_at_h11g2000prf.googlegroups.com>


On 13 mar, 21:00, TroyK <cs_tr..._at_juno.com> wrote:
> On Mar 12, 11:33 am, Cimode <cim..._at_hotmail.com> wrote:
>
>
>
> > On Mar 12, 4:29 pm, TroyK <cs_tr..._at_juno.com> wrote:
>
> > > On Mar 12, 8:33 am, Cimode <cim..._at_hotmail.com> wrote:
>
> > > > On Mar 11, 5:38 pm, Cimode <cim..._at_hotmail.com> wrote:
>
> > > > > > Why not:
> > > > > > [MAKE RICH_EMPLOYEE = {EMPLOYEE WITH SALARY > 100000}]
> > > > > > (with curly braces around the derivation expression)? It seems a
> > > > > > little "off" to use them only sometimes.
>
> > > > > Because I reserved '[]' to relation operation and '{}' to relation
> > > > > definition. I will keep the remark in mind though
>
> > > > To be more explicit {} is attribute level manipulation and [] is
> > > > relation level manipulation to keep the language as versatile as
> > > > possible. For example
>
> > > > [MAKE R0 = {ATTRIBUTE0_1, ATTRIBUTE0_2}]
> > > > [MAKE R1 = {ATTRIBUTE1_1, ATTRIBUTE1_2}]
> > > > [MAKE R2 = R0 UNION R1]
> > > > PRESENT2D [R2]
>
> > > > does the same thing as
>
> > > > PRESENT2D [{ATTRIBUTE0_1, ATTRIBUTE0_2} UNION {ATTRIBUTE1_1,
> > > > ATTRIBUTE1_2}]
>
> > > > It is also about the coherence of the computing model behind. The
> > > > input of the media layer is necessarily a relation. The input of the
> > > > logical layer may either be a relation or an attribute set.
>
> > > I see what you're aiming for and I think that I agree with the syntax.
> > > The example that introduced the confusion for me is this:
> > > [MAKE VIP_MEMBER = {RICH_EMPLOYEE}]
>
> > > where "RICH_EMPLOYEE" refers to a relation.
>
> > > TroyK
>
> > Basically if I write down
>
> > 1) [MAKE VIP_MEMBER = {RICH_EMPLOYEE}]
> > or
> > 2) [MAKE VIP_MEMBER = {MEMBER RICH_EMPLOYEE}]
>
> > I am defining VIP_MEMBER as having one attribute of type RICH_EMPLOYEE
> > (named RICH_EMPLOYEE in case 1 or MEMBER_RICH in case 2) while if I
> > write
>
> > [MAKE VIP_MEMBER = [RICH_EMPLOYEE]] I am actually equating the
> > relation VIP_MEMBER and the relation RICH_EMPLOYEE. Both are in fact
> > valid. It just depends if we are working at relation level or at
> > attribute level.- Hide quoted text -
>
> > - Show quoted text -
>
> I think I'm getting tripped up over whether the declaration is of a
> new relation (called VIP_MEMBER that has (a) one attribute that is a
> relvar, or (b) one attribute that is a relation.
An un-ary relation is *de facto* is a type. When using {}, (b) is correct

> Is this syntax:
> [MAKE VIP_MEMBER = [RICH_EMPLOYEE]]
> a view definition, or an assignment?
A relation level assignment. Not a view. When running...
[MAKE VIP_MEMBER = [RICH_EMPLOYEE]] I am creating a new relation whose body is independent from RICH_EMPLOYEE. As soon as an operation impacts any of the two bodies, the two relations do not equate anymore.

As a consequence, if I then run
[MAKE VIP_MEMBER = VIP_MEMBER - {1, 1} ] --> delete [MAKE RICH_EMPLOYEE = RICH_EMPLOYEE - {1, 2} ] VIP_MEMBER and RICH_EMPLOYEE relation are not equal anymore because only their header and constraint set are equal.

> By the way, I should have prefaced my first response to the thread
> with the disclaimer that I'm by no means a language designer, so you
> can feel free to take my comments with a grain of salt.
I am trying to gain a feedback and perception from all users that can help me sharpen the language. You help is appreciated.
> TroyK
Received on Thu Mar 13 2008 - 22:27:30 CET

Original text of this message