Re: XQuery (and XML) vs LISP

From: dawn <dawnwolthuis_at_gmail.com>
Date: 7 Feb 2006 15:06:36 -0800
Message-ID: <1139353596.930774.242630_at_f14g2000cwb.googlegroups.com>


Jan Hidders wrote:
> dawn wrote:
> > Jan Hidders wrote:
> >
> >>I think the answer is, vaguely, yes. :-) You can think of the tree is a
> >>binary relation, and if you want access to all descendants the system
> >>could provide conceptually the transitive closure to you (so for the
> >>binary table R you could for example use R* as the notation for its
> >>transitive closure) and from there you could specify your queries as
> >>usual. Most XPath queries would then translatie to simple
> >>SELECT-FROM-WHERE queres.
> >
> > If they are not nested relations but nested ordered lists, as possible
> > with XML documents, then you would lose information this way, right?
>
> Right. But you could add an extra binary relation that defines the order.

Right-o, and then the user (aka developer) must be sure to do the join and the order-by as they will not be handled by the tools.

I suspect that multiple multivalues will still not be pretty if using an extended SQL on nested relations. I keep meaning to look at XQuery to see if it handles output as in the old pizza example with multiple multivalues, such as the following output (sorry for dots in effort to get good enough spacing)

PizzaName.....Crust.........Meats...............Veggies.........Cheeses


OurFamous.....DeepDish...Pepperoni.........Mushrooms....Parmesan
.......................................Sausage................................Moz
.......................................Ham

Everything.......Thick.........Pepperoni.........Olivies...........Moz
.......................................Ham.................Onions..........Provolone
...............................................................Peppers

Thanks. --dawn Received on Wed Feb 08 2006 - 00:06:36 CET

Original text of this message