Re: If you were to implement the original relation algebra language...

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Fri, 21 Nov 2003 12:12:29 -0000
Message-ID: <bpkvlo$1h6a$1_at_gazette.almaden.ibm.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:zNednXbcWLzXGiCiRVn-uA_at_golden.net...
> > > In the end though, precedence is just a convention with
> > > little real importance.
> > Could have importance when implementing it though. Even Date says that
> > project should have the higher precedence in RA in Introduction to DB,
> 2003.
>
> Whether project has higher precedence in the language grammar has no
> relevance to whether the dbms evaluates project before join.
>
> If addition had higher precedence than multiplication, we would just
> rewrite:
>
> a*b+c = (a*b)+c
>

I guess we would be better off moving away from infix operators and using prefix/functional operations instead in relational algebra grammers. The rochester cs link shows how clean this can be. For their part, I suspect Date and Darwen are thinking about moving that way. E.g. To quote from http://www.hughdarwen.freeola.com/TheThirdManifesto.web/Missing-info-without-nulls.pdf

"I have added prefix JOIN and prefix UNION here, to allow more than two operands in each case.

Tutorial D as currently defined has only infix versions of these operators. UNION ( a, b, c ) is

equivalent to ( a UNION b ) UNION c, not that it matters where you put the parentheses, of

course. Similarly, JOIN ( a, b, c ) is equivalent to ( a JOIN b ) JOIN c, and again it doesn't matter

where you put the parens."

Regards
Paul Vernon
Business Intelligence, IBM Global Services Received on Fri Nov 21 2003 - 13:12:29 CET

Original text of this message