Re: XQuery (and XML) vs LISP
Date: Wed, 08 Feb 2006 21:26:37 GMT
Message-ID: <hmtGf.244057$ap7.7706752_at_phobos.telenet-ops.be>
dawn wrote:
> 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.
That depends of course upon the tools, and note we were talking about a hypothetical extension of relational tools.
> 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)
Please use a fixed-with font if you want dependable spacing.
> PizzaName.....Crust.........Meats...............Veggies.........Cheeses
> ================================================
> OurFamous.....DeepDish...Pepperoni.........Mushrooms....Parmesan
> .......................................Sausage................................Moz
> .......................................Ham
>
> Everything.......Thick.........Pepperoni.........Olivies...........Moz
> .......................................Ham.................Onions..........Provolone
> ...............................................................Peppers
Provided you reformulate it such that the output is in XML the answer is "that is what it was designed to do".
- Jan Hidders