W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > July 2012

Question about duplicate triples

From: David Booth <david@dbooth.org>
Date: Mon, 30 Jul 2012 18:18:28 -0400
To: public-rdf-dawg-comments@w3.org
Message-ID: <1343686708.2725.68560.camel@dbooth-laptop>
Suppose I LOAD a single file of NTriples into a named graph foo:, and
that file contains some duplicate triples such as:

  _:bnode <http://example/ppp> <http://example/vvv> .
  _:bnode <http://example/ppp> <http://example/vvv> .
  _:bnode <http://example/ppp> <http://example/vvv> .

According to the RDF Semantics, an RDF graph is a *set* of triples.
Hence, AFAIK the above file represents an RDF graph containing *one*
triple, and the graph is lean.

If I then query that named graph as follows, how many solutions should I

  SELECT * WHERE { GRAPH foo: { ?s ?p ?v } }

Is the SPARQL server permitted to return more than one solution (i.e.,
duplicates) in this case?

I am aware of the DISTINCT keyword, but I always understood it as being
intended for situations where the query could generate multiple
candidate solutions, which is not the situation in this case.  It seems
a little weird if a SPARQL server might return multiple solutions in
this case, but would it still be conforming to the SPARQL spec if it


David Booth, Ph.D.

Opinions expressed herein are those of the author and do not necessarily
reflect those of his employer.
Received on Monday, 30 July 2012 22:18:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:12 UTC