W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2009

Re: last week's minute and next week's agenda

From: Steve Harris <steve.harris@garlik.com>
Date: Mon, 23 Nov 2009 18:17:59 +0000
Cc: Lee Feigenbaum <lee@thefigtrees.net>, SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <F641527F-6BC8-4256-A951-3E592800A77F@garlik.com>
To: Paul Gearon <gearon@ieee.org>
On 23 Nov 2009, at 16:11, Paul Gearon wrote:
>> Another thing we could discuss is FROM v's GRAPH syntax in Update, eg
>>
>> 1) DELETE FROM <uri> { ?x ?y ?z } WHERE { GRAPH <uri> { ?x ?y ?z } }
>> and
>> 2) DELETE { GRAPH <uri> { ?x ?y ?z } } WHERE { GRAPH <uri> { ?x ?y ? 
>> z } }
>>
>> (potentially same as DELETE WHERE { GRAPH <uri> { ?x ?y ?z } })
>>
>> FWIW, I prefer the 2) form, I find it clearer.
>
> I don't see technical merits of one over the other (unless I'm missing
> something), so it can go either way.
>
> I like the structure of (1) more, as it is closer to the syntax of
> existing forms. However, (2) is structured a little more consistently,
> so I see the appeal there. Since I prefer consistency across the board
> over style, then I'm leaning towards (1).

The main problem with (1) is that it can be misleading (to me at least):

DELETE {
   ?x ?y ?z
}
WHERE {
   GRAPH <G> { ?x ?y ?z }
}

Removes the contents of G from the default graph, not from G.

The GRAPH form makes the proposed shorthand notation for DELETEs  
easier to use:

DELETE WHERE { GRAPH <g1> { ?x ?y ?z } GRAPH <g2> { ?x ?y ?z } }

The FROM syntax prevents you from doing operations such as:

DELETE WHERE {
   GRAPH ?g { ?x a <Foo> }
}

Which is pretty unfortunate if you work with named graphs.

- Steve

-- 
Steve Harris, CTO, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10  
9AD
Received on Monday, 23 November 2009 18:18:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:40 GMT