SQL, C++, and Hell
sowa@ranch.poly.edu (John F. Sowa)
Date: Wed, 27 Jul 94 15:06:24 -0400
From: sowa@ranch.poly.edu (John F. Sowa)
Message-id: <9407271906.AA05214@ranch.poly.edu>
To: cg@cs.umn.edu, interlingua@ISI.EDU, kr-advisory@ISI.EDU, srkb@ISI.EDU
Subject: SQL, C++, and Hell
Cc: sowa@ranch.poly.edu
Sender: owner-srkb@cs.umbc.edu
Precedence: bulk
The following article by Timothy Andrews of the Ontos Corporation
makes some good points about languages and standards:
T. Andrews, "Designing Linguistic Interfaces to an Object Database
or What do C++, SQL, and Hell have in Common?" in _Database
Programming Languages (DBPL-4)_, edited by C. Beeri, A. Ohori,
and D. E. Shasha, Springer-Verlag, 1993, pp. 3-8.
For people who don't have that book handy, following are some
quotations that give the general flavor of the article:
"The joke in the title is one that has circulated amongst the
technical community I've been in for years. It points out that
'industry' seems to make the worst possible choices from a technical
view: many would argue that the dominant relational and object
products are not the most technically superior, and SQL became the
dominant language in the relational database world, despite many
clearly better ideas....
"Along similar lines, the programming community has chosen C++ as
the standard OOPL, despite more promising languages such as Smalltalk,
CLOS, Prolog, Eiffel, etc. Today C++ is the standard language for
object descriptions as well.... In each case, we have chosen one of
the 'lowest level' languages in the field, and after all, you can't
get much lower than hell itself....
"Against this backdrop, I will answer the questions posed at the
beginning, the first of which dealt with the construction of an ideal
DBPL. For me, this means a unifying framework between the programming
and the database environment, which for me, means objects at the heart.
In order to gain the benefits, I want a language that is terse,
expressive, extensible, and reflexive....
"If the language is not reflexive, i.e. self-describing, then I
must add this meta-layer myself because I cannot rationally build a
DBMS without it....
"C++ is capable of expressing any computation and it is extensible,
but it lacks parsimony. This one lack causes systems written in C++
to explode in size when complex problems are attacked: it is difficult
to leverage previous efforts as effectively as in functional languages
such as LISP or declarative languages such as Prolog or even (ugh) SQL.
"SQL, on the other hand, lacks extensibility. This makes it very
difficult to create new concepts and new forms to control their behavior.
This prohibits layering abstractions, a crucial technique for managing
large and complex systems, and foists the problem upon the programmer,
who then has to deal with three worlds: the relational world of SQL,
the structured world of the programming environment, and the passage
between the two....
"As if having to deal with C++ as an object definition and
manipulation language wasn't bad enough, we were also obliged to
support SQL, the accepted database language standard. As I pointed
out in the Introduction, this is somewhat akin to recognizing the car
as a major advance in transportation, and then demanding that the
controls be stirrups and reins....
"In the commercial world, standards are a dominant force. There are
two primary kinds of standards, de facto and de jure, both of which are
important to commercial vendors. SQL has moved from de facto to de jure,
as has C++. Now objects are making their way through the standards
process. I am not a big fan of standards as they exist. The idea is
great: standardize on key elements to enable work at a higher level
and assure customers of interoperability between products compliant
with the standard. However, in the case of SQL, the standard was
minimal, and large efforts were left out....
"SQL-3 seems to be a leap backwards in many respects. It inserts
procedural mechanics into the standard, which not only destroys the
integrity of the calculus, it goes against the very grain of declarative
semantics that makes SQL interesting in the first place. It adds object
'feature' in an ad hoc fashion; specifically its notion of inheritance
is structural rather than behavioral. However, SQL-3 will almost
certainly be the dominant object database standard, adding more
credence to the title once again.
"I opened my talk by trying to exhort the researchers to continue
their labors because they do have impact. I wanted to say something
positive before I launched into my diatribe on the commercial realities!
But it reflects the truth, and even if only a small percentage of the
real power of research ideas makes it into commercial products, it is
better than none."
John Sowa
PS: I've been having some problems in doing a telnet from home to
my userid at SUNY Binghamton. Therefore, I have also been using this
id at Polytechnic University. I seem to be having better luck with
this one. Please send replies to sowa@ranch.poly.edu.