Re: Metadata about single triples

Hi Carsten,

On Thu, 2012-02-23 at 22:09 +0100, Carsten Keßler wrote:
[ . . . ]
> So we'd have to do (assuming all graph metadata are stored in the same graph):
> select ?s ?p ?o where {
> graph ?g1 { ?g <>
> <> .
>                  ?g2 <>
> <> .
> }
> graph ?g { ?s :p1 ?o .}
> graph ?g2 { ?s :p2 ?o .}
> }
> That's what I was planning for – not nice, but I could live with that.
> Or does that query imply ?g != ?g2 ? This would not get us the results
> where both triples happen to be in the same named graph, which would
> be a problem…

That does not imply that ?g != ?g2, so it should work fine.  But I hope
you now see where this is going.  Essentially, you have used a clause

 ?gN <>  
        <> .

instead of a "FROM NAMED" clause, so if you have N graphs, then you'll
need N of these clauses.  But even worse, depending on how the SPARQL
server optimizes your query, it is very likely to get into a
combinatorial problem.

So again, that approach may be fine for some cases, but I don't think it
would be satisfying as a general approach.

David Booth, Ph.D.

Opinions expressed herein are those of the author and do not necessarily
reflect those of his employer.

Received on Friday, 24 February 2012 14:10:01 UTC