Re: What databases have taught me

From: Bruno Desthuilliers <onurb_at_xiludom.gro>
Date: Fri, 23 Jun 2006 17:10:25 +0200
Message-ID: <449c0462$0$13036$>

Erwin wrote:

>>oh, really ? Could you please elaborate about what you mean when
>>asserting that Smalltalk is "a thousand times more strictly
>>hierarchical" than Java etc ? I fail to understand about which
>>hierarchies you're talking about here - class hierarchy or runtime
>>associations between objects ?

> I presume it must be "class hierarchies" because I fail to grasp what
> is meant precisely by "runtime associations between objects".
>>>Hmmmmmm.  Is it really the *algebra* you think is crippled ?
>>AFAICT, yes. At least what I learned as being "algèbre relationnelle".
>>>What kind
>>>of operation do you think is unsupported by the algebra ?
>>I don't know how this translates in english, the french term is
>>"fermeture transitive d'un graphe". IOW, if I have (minimal example):

> That was exactly the answer I was expecting,


> and indeed you betray your
> ignorance.

Then blame my teachers for this. And all the litterature that keep on saying RA can't do this.

> The English term is "transitive closure", and the operator
> has, bel et bien, been part of the *algebra* since I don't know when.

some link, please ? (not that I doubt your assertion, just want to stop being ignorant)


>>AFAIK, when you put this into a RDBMS, you need additional code - either
>>in "procedural SQL" or in the client app - to deal with this.

> Yes, but SQL DBMSs are not R DBMSs.

And *this* was exactly the answer I was expecting !-) </trolling>

> The lack of a closure operator *IN
> SQL* should not be interpreted as a shortcoming of *the relational
> model*, nor as one of the relational algebra. Doing so is, as Chris
> Date puts it, criticizing the relational model for never having been
> implemented properly.

Possibly. But from a very practical POV, I do have to deal with this improper implementation.


>>I'd really like to know how to handle this cleanly and
>>efficiently with a RDBMS without using stored procedures... 

> Well, as I pointed out, in a *true* RDBMS,

Where do I find one ?-)

> just invoke the closure
> operator over your binary relation (that records the links between the
> nodes). In an SQL DBMS, roll your own operator.

How ? With a stored procedure ? (else, any link welcome - I admit not having read the *whole* PostgreSQL doc).

> So your criticism of
> "not being able to handle hierarchies", is really a criticism of SQL,
> not one of the relational algebra.

Granted. Now since I don't have any better implementation of the relational model, I have to deal with the existing ones.

And FWIW, you didn't answer the question about heterogenous hierarchies. Here again, if you know the solution, please feel free to share.

bruno desthuilliers
python -c "print '_at_'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb_at_xiludom.gro'.split('@')])"
Received on Fri Jun 23 2006 - 17:10:25 CEST

Original text of this message