Re: XQuery (and XML) vs LISP

From: beelzebub <tarball_at_gmail.com>
Date: 10 Feb 2006 10:01:28 -0800
Message-ID: <1139594488.700684.27630_at_g47g2000cwa.googlegroups.com>


I understand any tree structure may be represented by edge pairs which may be stored
in a binary relation. In terms of representation, XML therefore does not do anything that we
may not be able to achieve using relational schemes. However, interpreting a table is a semantic
notion. The fact that we NEED to traverse edges of the tree, say using a depth first
search, can be represented more easily using XQuery on XML data.

Let me ask a more concrete question. Suppose I want to represent a tree where all nodes are of the
same type, say Person. Link from person A to person B exists, say if A is a parent of B. (I could've
just called it a family tree I guess).
It is reasonably obvious to see how to store this information persistently using both XML and simple binary relation. Asking a question, is person X an ancestor of person Y is rather straightforward in
XQuery. How would I formulate an equivalent query in SQL?

I strongly suspect it is the query language that separates XML and Relational schemes and not the
representation. Comments? Received on Fri Feb 10 2006 - 19:01:28 CET

Original text of this message