[Versa] Versa issue: subgraph primitives?
Michael Olson
Mike.Olson at fourthought.com
Thu Sep 8 21:45:33 MDT 2005
On Sep 8, 2005, at 9:16 PM, Chimezie Ogbuji wrote:
>> { type(rss:item) - rss:title -> contains('4Suite') } . - dc:creator
>> -> *
>>
>> or
>>
>> { type(rss:item) |- rss:title -> contains('4Suite') } . - dc:creator
>> -> *
>
> Whoops, the use of '.' to refer to the context bound to the scoped
> query doesn't seem right. I'd probably want:
>
> { type(rss:item) |- rss:title -> contains('4Suite') } [ - dc:creator
> -> *]
> or
> { type(rss:item) |- rss:title -> contains('4Suite') } all() -
> dc:creator -> *
>
> Since, '.' refers to the context 'node' (as of the current
> specification). In this case, the 'context node' as it was defined
> before is actually a list of statements (in the new sense), so it
> doesn't seem to make sense in the first slot of a traversal expression
> - which expects a list of 'resources' (not statements) to match
> statement subjects against.
>
> That's probably not clear, but basically, introducing a context (a
> named list of statements) as a first class object means you have to
> account for every possible place it could be used in the grammar.
>
I missed that as well. However, WRT your concerns of the new data
type, I don't see it as any different then having to check for
6 - rdf:value -> *
(assuming 6 is a constant, not a literal query)
> And just for the record. I'm pretty sure (at least in the RDBMS
> implementation of a context-aware RDF store) that
>
> { type(rss:item) |- rss:title -> contains('4Suite') } all() -
> dc:creator -> *
>
> would be more efficient to execute than
>
> (type(rss:item) |- rss:title -> contains('4Suite')) - dc:creator -> *
>
I agree. In 4RDF, I see an extension function for its idea of scope so
subgraph c = ext:subgraph-by-scope("http://4Suite.org")
{c} query
where the processor could be very smart and not evaluate "c" because it
s just an addition to the where clause later....
*slap* premature optimization.....
Mike
------------------------------------------------------------------------
-----------------
Mike Olson Principal
Consultant
mike.olson at fourthought.com +1 720 253 4662
Fourthought, Inc.
http://Fourthought.com
PO Box 270590, http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management
More information about the Versa
mailing list