home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!natinst.com!bigtex!texsun!cronkite.Central.Sun.COM!news2me.ebay.sun.com!jethro.Corp.Sun.COM!starflight!jdr
- From: jdr@starflight.Corp.Sun.COM (Jon Roland)
- Newsgroups: comp.databases
- Subject: Re: nested SQL select
- Message-ID: <l990h3INN7it@jethro.Corp.Sun.COM>
- Date: 21 Aug 92 05:41:55 GMT
- References: <1992Aug14.071343.1758@neptune.inf.ethz.ch>
- Reply-To: jdr@starflight.Corp.Sun.COM
- Organization: Sun Microsystems, Inc.
- Lines: 58
- NNTP-Posting-Host: starflight.corp.sun.com
-
- In article 1758@neptune.inf.ethz.ch, marti@nugget.inf.ethz.ch (Robert Marti) writes:
- >In any case, I don't have a "one-SQL-statement-solution" to your
- >problem, either ...
- >
- >I didn't follow that thread. While I (again, see above) agree that
- >SQL has its flaws ("brain-damaged" is a bit too strongly worded for
- >my taste), you will certainly have a hard time to "stamp it out" --
- >at least for the time being. Even Mike Stonebraker, whose QUEL
- >language design is regarded by most academics to be superior to
- >SQL, has termed SQL "intergalactic data speak". (Sorry, I don't
- >remember where.)
- >
- >jr> Relational algebra allows expressions which have no SQL
- >jr> equivalents, because SQL is not an implementation of relational
- >jr> theory, and doesn't threaten to become one in the future.
- >
- >An interesting statement. Could you give me a few examples of
- >relational algebra expressions which have no SQL equivalent?
- >(Please only use operators from the set {selection, projection,
- >union, difference, cartesian product}. This set of operators
- >has been shown to be complete.)
-
- You discussed one in your own posting. A single relational algebra
- expression can be composed that does not translate into a single SQL
- statement, but requires several of them. Granted, it does translate,
- but so clumsily that one has to complain.
-
- More serious, however, is the fact that in relational algebra operators
- applied to relations yield relations, whereas in SQL they do not always
- do so. To be a relation, a table's rows must be unique, and SQL can
- yield tables with redundant rows.
-
- Of course, we must distinguish between relational algebra, calculus, and
- Codd's relational theory -- which is based on them but extends them.
- Relational theory reasonably allows self-referencing or recursion, which
- SQL does not.
-
- However, I would contend that relational algebra (and calculus) lack
- sufficient structure to provide an adequate theoretical foundation for
- commercial databases.
-
- There is no really good substitute for Turing-computable languages, even
- only for use in data access.
-
- Mike Stonebraker's latest language, developed with his students at
- Berkeley, is Postquel, used with their Postgres db. It is in the Quel
- tradition, but not upward-compatible with it. You might also look at
- Rubix, a nice functional language, and Q'Nial, considered as a database
- language.
-
- I am emailing you the "SQL Shortcomings" thread.
-
- ---
-
- jdr@starflight.corp.sun.com, starflt@uunet.uu.net
- Jon Roland
- Starflight Corporation, 1755 E Bayshore Rd #9A,
- Redwood City, CA 94063-4142, 415/361-8141
-