Re: ISSUE-48: Less verbose delete syntax

On Friday 6. November 2009 18:55:22 you wrote:
> On 6 Nov 2009, at 10:26, Andy Seaborne wrote:
> > Consider:
> >
> > DELETE { ?x :p ?o }
> > DELETE { ?x :p ?o } WHERE { ?x :p o . FILTER(?o = <doesnotexist> }
> >
> > which might arise from either using DELETE for INSERT by mistake the
> > second time or other bad editting
> 
> I don't quite follow this example.

/me neither... 

> > Assuming the INSERT is optional as well, which I think is the intent,
> > we have to be a bit careful about creating traps for the unwary:

Yeah, especially if we missed the point of the above example entirely. 
Anway, pointing to what Steve said:
> I've had several bad experiences with SQL and typing:
>     DELETE FROM table<enter>
> when I was just thinking what I would type next and pressed enter  
> reflexively. I'm happy to chalk it up to incompetence on my part, but  
> I think we can do better than SQL in this area.

Those who have never done this, raise their hands! Right, I see no hands in 
the air, thought so... :-) (A colleague of mine once did a UPDATE on a prod 
system and forgot the WHERE clause in an extremely stressful situation. Too 
much had happened overnight, so we couldn't roll back, but I quickly 
realised we didn't need the data he had overwritten).

I think that people have gotten used to such things, and I would opt for 
simple over safe, but if we can be clever and do both, that's the best. :-)


> > And DELETE without WHERE is potentially ambiguous as a grammar and
> > certainly optically:
> >
> > DELETE
> > INSERT
> > WHERE
> >
> > Is that one request
> >  DELETE-INSERT-WHERE
> > or two
> >  DELETE
> >  INSERT-WHERE
> 
> I think we agreed that there would be some separator (from memory ';')  
> to avoid that kind of problem, though I don't think we discussed the  
> DELETE { ... } syntax explicitly.

Nevertheless, Andy's right, it is an important didactical problem.

> > What about missing the template out instead:
> >
> > DELETE WHERE {?x :p ?o }
> 
> If we're going to support this kind of syntax abbreviation, then this  
> looks better to me.

Works for me too. That's close to what I proposed in
http://lists.w3.org/Archives/Public/public-rdf-dawg/2009AprJun/0315.html
How about the UPDATE keyword I propose in there?

Cheers,

Kjetil
-- 
Kjetil Kjernsmo
kjetil@kjernsmo.net
http://www.kjetil.kjernsmo.net/

Received on Friday, 6 November 2009 22:08:24 UTC