Re: If you were to implement the original relation algebra language...
Date: Sat, 22 Nov 2003 13:52:14 -0800
Message-ID: <1069537938.615424_at_news-1.nethere.net>
"Bob Badour" <bbadour_at_golden.net> wrote in message <news:m_2dnes63Z0zKSKiRVn-vg_at_golden.net>...
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
> news:Q6Ovb.208724$275.779602_at_attbi_s53...
> > "Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message
> news:bpkvlo$1h6a$1_at_gazette.almaden.ibm.com...
> > >
> > > I guess we would be better off moving away from infix operators and
> using
> > > prefix/functional operations instead in relational algebra grammers.
> >
> > I think we would be better off providing the language with enough
> > flexibility so that the programmer can choose the most appropriate
> > form of expression at the time. cf. Haskell.
>
> Are you suggesting you prefer redundant languages?
One might have to, to get the camel's nose into the tent. Even though relational algebra is no less powerful than relational calculus, some queries may be easier to express in relational calculus. Use Codd's reduction algorithm to translate it to the relational algebra. Next up, the SQL mutants used in ODBC and JDBC unless you want shelfware...
If the parser and optimizer for the One True Relational Algebra are smart enough, the translators for the Great Unwashed can get away with being dumber and less work to implement. Some syntactic sugar may have to creep into the One True language, otherwise a translator would need information about R1's value to convert a sugar-frosted R1 { ALL BUT ATTRIBUTE1 } to R1 { ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTEX, ATTRIBUTEY, ATTRIBUTEZ, ... } let alone what would be needed to convert any JOIN to a product, rename, restrict, and sugar-free project.
-- Joe Foster <mailto:jlfoster%40znet.com> "Regged" again? <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!Received on Sat Nov 22 2003 - 22:52:14 CET
