W3C home > Mailing lists > Public > public-lod@w3.org > February 2012

Re: Metadata about single triples

From: Michael Brunnbauer <brunni@netestate.de>
Date: Thu, 23 Feb 2012 23:47:55 +0100
To: David Booth <david@dbooth.org>
Cc: carsten.kessler@uni-muenster.de, public-lod@w3.org, Chad Hendrix <hendrix@un.org>
Message-ID: <20120223224755.GA6902@netestate.de>

Hello David,

so the problem is not to get the merge of the matching graphs but to query
it ? Sorry - I was not following this thread with full attention.

In this case it seems that you have to repeat the metadata pattern for
every query triple like Carsten suggested. Or you first get a list of
matching graphs and then use that list with from named in a second query.

Regards,

Michael Brunnbauer

On Thu, Feb 23, 2012 at 01:44:15PM -0500, David Booth wrote:
> Hi Michael,
> 
> On Thu, 2012-02-23 at 16:59 +0100, Michael Brunnbauer wrote:
> [ . . . ]
> > I do not see why you have to name thousands of graphs in the query. Is
> > the metadata not attached to the named graph with the named graph URI
> > as subject ?
> > 
> > You could query it like this:
> > 
> > select ?s ?p ?o where {
> > graph ?g1 { ?g <http://xmlns.com/foaf/0.1/maker> <http://www.brunni.de/foaf.rdf#me> }
> > graph ?g { ?s ?p ?o }
> > }
> 
> That technique may usable in some cases, but it means something
> different from using multiple "FROM NAMED" clauses.  In the example
> above, graph ?g is an *individual* graph -- the triples from all of
> the ?g graphs are never merged.  The difference shows up when you need
> to join triples that originate in different graphs.  For example, if
> your query wanted both "?s :p1 ?o" and "?s :p2 ?o" to be true and you
> wrote something like this:
> 
>   select ?s ?p ?o where {
>   graph ?g1 { ?g <http://xmlns.com/foaf/0.1/maker> 
>                      <http://www.brunni.de/foaf.rdf#me> }
>   graph ?g { ?s :p1 ?o .  
>            ?s :p2 ?o .}
>   }
> 
> then this query will only work if both of these triples come from the
> *same* graph ?g, whereas if the graphs were all listed in "FROM NAMED"
> clauses, then one triple could come from one graph and the other from
> another.
> 
> 
> -- 
> David Booth, Ph.D.
> http://dbooth.org/
> 
> Opinions expressed herein are those of the author and do not necessarily
> reflect those of his employer.

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail brunni@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel
Received on Thursday, 23 February 2012 22:48:19 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 31 March 2013 14:24:37 UTC