W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2010

Re: SPARQL Update feature

From: Alexandre Passant <alexandre.passant@deri.org>
Date: Tue, 6 Jul 2010 22:39:20 +0200
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <1B0C5BFE-B1D7-420B-81BF-0DB12A761864@deri.org>
To: Andy Seaborne <andy.seaborne@talis.com>

On 6 Jul 2010, at 22:20, Andy Seaborne wrote:

> It occurred to me we are missing a feature in SPARQL Update (language) - the ability to clear the graph store. That is, drop all the named graphs and empty the default graph.

Indeed, that makes sense, esp. when working with RDF store in dev / debug phase.

> While , in some stores, the similar effect can be achieved with
> DELETE WHERE { GRAPH ?g { ?s ?p ?o } }
> because they drop empty graphs, it's not possible in general to drop all the named graphs.
> Therefore either something to drop all named graphs, or something to reset the graph store is needed.
> # Drop all named graphs.
> DROP GRAPH ALL does not work very well if it's CLEAR GRAPH DEFAULT
> (actually, I thought the syntax was going to be CLEAR DEFAULT, not CLEAR GRAPH DEFAULT)

What do you mean by does not work well ?

> # Clear the graph store.
> CLEAR ALL # but the named graphs aren't cleared, they are dropped
> DROP ALL # but the default graph isn't dropped
> ...

Since CLEAR does not necessary entail that the graph is removed (stores keeping empty graphs), I'd prefer to use DROP ALL.
However, since the default graph is never removed, that's also ambiguous as you said.
I guess it could be solved by indicating that a store MUST always have a default graph, and that if this graph is dropped, the system MUST restore it.

Hence, DROP ALL will DROP all graphs, and the system MUST re-create the default one (as an empty graph).

That would lead to 




(and DROP GRAPH DEFAULT == CLEAR GRAPH DEFAULT with the previous auto. default-graph creation feature)

Makes sense ?


> 	Andy

Dr. Alexandre Passant
Digital Enterprise Research Institute
National University of Ireland, Galway
:me owl:sameAs <http://apassant.net/alex> .
Received on Tuesday, 6 July 2010 20:39:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:01 UTC