The world rejoiced as kleptog@svana.org (Martijn van Oosterhout) wrote:
> On Fri, May 24, 2002 at 12:43:36PM -0500, Gunther Schadow wrote:
>> - Sending a parse tree in XML for processing by the optimizer.
>> This circumvents the SQL language and avoids the kinds of
>> syntactic ideosyncrasies of SQL (e.g., where you put commas.)
>> This is fairly trivial, but of course the question is, would it
>> be worth it?
X-Mailer: mh-e 6.1; nmh 1.0.4+dev; Emacs 21.4
> I don't know if you can design something in XML that is expressive
> and simple enough to compete with SQL. SQL is a simple language, why
> replace it with something unless it is demonstrably better.
SQL is good at providing "linear" queries; queries that indicate some
"linear" relationship between elements.
It is not so good at representing hierarchical relationships, which is
what XML is about.
The SQL: SELECT FIELDS FROM TABLE
provides you with a linear list.
SQL isn't _nearly_ as nice at representing things that are naturally
expressed as trees. It's pretty easy to have a DB schema where you
essentially have to submit an SQL query for every level of the tree.
And I am not ignoring JOIN here; that adds _some_ ability to join
together levels of trees, but not an unlimited ability.
The XML model fundamentally involves a hierarchy, and the 'query
method' involves passing in a function that reshapes that hierarchy.
I think there would be considerable value to that.
It certainly needs to be thought about before it is implemented, but
it's worth thinking about, to be sure.
--
(reverse (concatenate 'string "gro.gultn@" "enworbbc"))
http://www.ntlug.org/~cbbrowne/multiplexor.html
"It is easier to move a problem around (for example, by moving the
problem to a different part of the overall network architecture) than
it is to solve it." -- RFC 1925