home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / 6259 < prev    next >
Encoding:
Internet Message Format  |  1992-08-22  |  3.0 KB

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