OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] What niche is XQuery targeting?

[ Lists Home | Date Index | Thread Index ]

On Thu, 2 Dec 2004 18:35:48 -0000, Michael Kay
<michael.h.kay@ntlworld.com> wrote:
 
> You can argue that the equivalent syntax in XSLT is very cumbersome, but
> that only becomes a problem if you're doing heavy joins, and I very rarely
> see applications that need that: in XML 90% of the relationships tend to be
> within the hierarchy, so you use the XPath axes rather than value-based
> joins.

This gets to one of the eternal mysteries that I don't fully
understand.  The "relational revolution" hinged on getting people to
think in terms of value based join rather than links/pointers, and on
RDBMS vendors figuring out how to implement them efficiently for
ordinary data processing work.  The CODASYL model that depended on
links/pointers just plain died in the '80s.

But the pendulum swung back the other way in the '90's -- the Web has
no such thing as joins, only hierarchical relationships within (many)
sites, and hyperlinks across pages.   [But it only actually works
because Google et al build a huge index that lets you search the whole
thing using a combination of brute force and clever heuristics. ]

In this decade, there are some signs that the pendulum is swinging
back again.  XLink sortof died with a whimper (although arguably RDF
and Topic Maps are holding the line).  Now XQuery comes along bringing
value-based joins into the XML world.

To my point:  A major use case for XML in data-oriented scenarios is
that it can conveniently represent pieces of data that have some sort
of hierarchical relationship to one another, and it turns out that
these are extremely common.  Since that's what XML is good for in the
first place (especially since non-hierarchical relationship mechanisms
such as ID/IDREF are second class citizens of XML at best), it's not
surprising that  most XSLT users are happy with just using the XPath
axes.  But XQuery at least potentially changes the rules here -- now
XML users can use hierarchies for the relationships that they are good
for and value-based joins for the other relationships.  (And I guess
you can use RDF/TM for the nasty relationships that value based joins
don't do very neatly).  XSLT will presumably continue to do well for
situations in which you are working within a single hierarchy, but
XQuery may open up new possibilities that were difficult to treat with
XML when there is not a single hierarchy.

So, I guess one could say that XQuery is at least implicitly targeting
the situations where you have multiple collections of XML or
XMLizeable information that need to be related, and allows you to
relate them dynamically by value rather than by a priori links.  This
could potentially set off a bit of a paradigm shift, e.g. rather than
thinking about relatively static topic maps, think about dynamic joins
for scenarios like the Wikipedia example on another thread.
[anticipating howls of rage from  the RDF, TM, and XLink advocates :-)
] . I don't have strong feelings that this will work or should be
done, but it intrigues me that this approach could help XML leverage
some of the features of the relational model that depend on joins.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS