- From: Graham Klyne <gk@ninebynine.org>
- Date: Fri, 05 Sep 2003 12:51:18 +0100
- To: "Sean B. Palmer" <sean@mysterylights.com>, "Libby Miller" <Libby.Miller@bristol.ac.uk>
- Cc: "www-rdf-rules" <www-rdf-rules@w3.org>, Damian Steer <pldms@mac.com>
At 10:56 05/09/03 +0100, Sean B. Palmer wrote: >Phew. So it's actually made up of lots of little queries and >conditions. I'm not sure whether the compilation method would be >faster or slower, and which is the best route to implementation. >Perhaps I ought to try both and thne compare them. The former looks >easiest, but flat RDF Queries are still pretty complicated things >because you constantly have to sift through all of the triples, unless >you've mapped masks in your Graph class, whereas in the Path >case--with all the little queries and conditions--you're pruning away >branches all the time. FWIW, one of my *perceived* advantages for path (and tree) style queries is that for many practical applications they seem to generate a fairly effeicient triple query sequence. Which is what I read into your "pruning away branches" statement. But I don't have better than anecdotal evidence to back that up, and I'm pretty sure that could break down in pathological cases. (The efficiency consideration here is due to the order in which one does triple-matching: with a simple, flat triple-based query, the order of triple matching isn't specifically defined, though I expect one would typically use the order in which they are presented. Using a "sensible" ordering means that the number of possible variable-bindings considered is reduced. My intuition is that a path-based approach naturally yields such an ordering for much "real-world" data, particularly where it is approximately tree-structured.) My Python implementation of a path query effectively compiled it to a sequence of triple queries that are constrained by a common variable-binding. [later] I've just noted Damian's later posting, which I think confirms something I suspected. I think there are two related but different notions of RDF path here: I (and also Sean, I think) are contemplating an expression that operates directly on the RDF graph structure to select graph content, where I understand Damian's work to be a exposure of RDF as if it were coded in some canonican XML format such that an XPath expression can be used to select graph content based on that format. Am I wrong? #g ------------ Graham Klyne GK@NineByNine.org
Received on Friday, 5 September 2003 08:16:56 UTC