Named Graphs VS plain quads in SPARQL syntax

Hi all,

I assume there is a perfectly good reason for this... but I would
really like to understand it thouroughly

Why was there a need to use the NAMED and FROM NAMED graph syntax
instead of extending sparql to use quads?
( by attaching an extra iri to statements patterns, for example ).

The following two queries should be equivalent... right?

SELECT ?mbox ?nick ?ppd
FROM NAMED <http://example.org/foaf/aliceFoaf>
FROM NAMED <http://example.org/foaf/bobFoaf>
WHERE
{
  GRAPH data:aliceFoaf
  {
    ?alice foaf:mbox <mailto:alice@work.example> ;
           foaf:knows ?whom .
    ?whom  foaf:mbox ?mbox ;
           rdfs:seeAlso ?ppd .
    ?ppd  a foaf:PersonalProfileDocument .
  } .
  GRAPH ?ppd
  {
      ?w foaf:mbox ?mbox ;
         foaf:nick ?nick
  }
}





SELECT ?mbox ?nick ?ppd
WHERE
{
    ?alice foaf:mbox <mailto:alice@work.example> data:aliceFoaf;
           foaf:knows ?whom data:aliceFoaf .
    ?whom  foaf:mbox ?mbox data:aliceFoaf ;
           rdfs:seeAlso ?ppd data:aliceFoaf.
    ?ppd  a foaf:PersonalProfileDocument data:aliceFoaf .
      ?w foaf:mbox ?mbox ?ppd ;
         foaf:nick ?nick ?ppd
}


Thanks,
A

Received on Monday, 12 November 2007 05:27:37 UTC