| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: XQuery (and XML) vs LISP
> Jan Hidders wrote:
>> beelzebub wrote:
>> > If XML is a syntactic representation of a typed tree structure and
>> > XQuery is a language that can process and construct such structures,
>> > how does the combination compare to LISP (with type information)? It
>> > seems like
>> > XML <=> S-Expressions (with types)
>> > XQuery <=> LISP functions
>> > Am I missing something here?
>>
>> Not much, except that XQuery is more designed as an ad-hoc query
>> language than a general programming language. That means that
>> queries that are thought to be typical XML queries can be more
>> succinctly formulated in a more readable way, and the language is
>> designed such that typical database-style query optimization
>> becomes easier than it would be for LISP.
>
> What would be interesting to me would be to understand more about
> the various techniques for tree traversal. The one I find most
> aesthetically appealing is ML-style pattern matching, but this has
> the disadvantage vs. XQuery of requiring the full tree structure to
> be specified (via patterns) even when you only want to query
> subtrees or particular kinds of nodes or what have you.
Does it? Or would the type polymorphism not allow you to leave a fair bit unspecified, and, if you never access the unspecified parts, let them fall away, irrelevant?
> I have no candidate in mind for a framework for comparing the
> expressive power of tree querying or tree rewriting
> languages. Sigh. The situation is so much clearer and cleaner with
> relations.
The trouble is that relations require taking something of a "set" perspective, and if facts aren't being expressed that way naturally, well, down that road lies some ghastlyness :-).
> I vaguely wonder whether it would be possible to use, or adapt,
> relational techniques for querying nested relations as an
> alternative to either XQuery or pattern matching.
Well, it sorta looks like sets versus, um, continuations...
-- (format nil "~S@~S" "cbbrowne" "gmail.com") http://linuxdatabases.info/info/slony.html "Lumping configuration data, security data, kernel tuning parameters, etc. into one monstrous fragile binary data structure is really dumb." - David F. SkollReceived on Sat Feb 04 2006 - 12:55:44 CST
![]() |
![]() |