Re: Examples of SQL anomalies?

From: paul c <toledobysea_at_ac.ooyah>
Date: Thu, 26 Jun 2008 16:38:59 GMT
Message-ID: <DCP8k.31014$Jx.18924_at_pd7urf1no>


Artemus Ward wrote:
> Before I waste a big chunk of next week, does anyone know of any docs on the
> web that attempt to gather together examples of anomolous behaviour in
> standard SQL? I am thinking particularly of things like inconsistent
> treatment of nulls. I've got a couple of (to me) very obvious examples but
> there must be many more.
>
> Failing that, can anyone suggest good Google search terms that might return
> a manageable number of hits? Nothing I've tried has been very useful.
>
> Arty
>
>

What I've read of CJ Date's suggests that he thinks nulls are not 'manageable' in the first place, so if one takes him to be an authority it shouldn't surprise that a web search will only expose more mayhem.

I took many of Date's criticisms of SQL as meaning that once one goes beyond the simplest of queries many inconsistent and/or wrong results are possible, not to mention a severe lack of closure, blah, blah. Personally, I'm content to accept that and not make a career out of studying all the nuances that make confusion inevitable. I heard Codd himself disparage SQL on the grounds that it doesn't enforce 'primary' keys. He went on at length about he considered them essential.

It also seems to me that a whole industry has been built on quicksand because of people's attachment to traditional procedural languages. A bit ironic since when Codd still worked for IBM and much of the relational theory was being developed, he and others would have been quite aware of IBM's own somewhat declarative language, RPG! (at least more declarative than the Cobol/PLI of those days and perhaps more declarative than the latest various versions of SQL - in RPG essentially all a problem did was replace its inputs with outputs, I thought of it as 'Replacement Program Generator'!)

The apparently wide-spread acceptance of SQL seems rather anti-human to me, I can only attribute it to the modern fascination with technocratic complexity. My simplest argument against it would be that the SQL standard is something like 1,000 pages of haphazard jargon (apparently it never mentions 'relations'!). I doubt if any one mortal, including Date, can assimilate it all. When he (and McGoveran and Pascal and Darwen) suggest that the original SQL developers either mis-read or mis-understood what Codd originally wrote. In later writings, even Codd himself added to the confusion, perhaps this was because he wasn't very interested with integration of languages with the model.

Even Date's response to SQL (as well as to the 'object' movement), ie., the TTM book and related writings, while written much more precisely than the SQL standard seems to me to be in danger of not being comprehensible by a single mortal. Received on Thu Jun 26 2008 - 18:38:59 CEST

Original text of this message