Re: What databases have taught me
Date: 23 Jun 2006 10:22:28 -0700
> Well, as I pointed out, in a *true* RDBMS, just invoke the closure
> operator over your binary relation (that records the links between the
> nodes). In an SQL DBMS, roll your own operator. So your criticism of
> "not being able to handle hierarchies", is really a criticism of SQL,
> not one of the relational algebra.
There is no transitive closure operator in the relational agebra*. This operator has been added in ad-hock fashion. Furthermore, to say that the area of hierarchical queies is well understood is a stretch. Transitive closure is expressed naturally in datalog, but the quesion is if datalog is really much better than SQL as a query language.
Anyway what are the alternative methods of handling hierarchies? It is naive to think that pattern matching method of XQuery is in any way superior to SQL even on its allegedly firm ground of hierarchical navigation.
*) Which relational algebra? Transitive closure fits naturally into Tarski algebra of binary relations, but that's another story. Received on Fri Jun 23 2006 - 19:22:28 CEST