Re: Removing triples from a store?

Hi Ivan,

'Triple adding' will also be important for programmers.

A typical use-case is to parse a page for details of a Twitter
account, and then use those details to retrieve the latest tweets by a
person. You /could/ simply retrieve the tweets and display them --
essentially an 'old-fashioned' JavaScripty technique. But a better
approach would be to retrieve the tweets and then just drop them
straight into the store. Once in the store they can be queried for,
and manipulated in whatever way we want, including being displayed.

Separating the retrieval of additional data from actions performed on
that data makes for a very powerful programming model.

Which brings us back to your point about /removing/ triples...

My instinct tells me that there must be a scenario for deleting
triples that is comparable to the one I've just described for adding
them -- but I can't think of one at the moment. :)

The use-case itself would probably relate to removing data from the
store that is difficult to ignore when writing a query. However,
although I think we probably should support this feature, I have to
say that in all the applications I've developed using my RDFa library,
it's much more common to want to delete entire graphs.

For example, in the Twitter scenario I gave earlier, I actually insert
the tweets into separate named graphs within a store. This means that
if I then go back to retrieve tweets for the same person again I can
simply delete their 'tweet graph' (one per person), rather than having
to find the individual tweets that are now buried in one monolithic
graph. Once the graph has been deleted it's a simple case of creating
it again and then adding in the latest tweets.

Obviously we haven't added graph support to the API yet, but my guess
is that any scenarios we think of for deleting triples will more than
likely be better served by providing named graph support so that we
can delete an entire collection in one go.

(None of which is to say that we don't support simple triple deletion, too.)

Regards,

Mark


On Fri, Jun 4, 2010 at 12:40 PM, Ivan Herman <ivan@w3.org> wrote:
>
> On Jun 4, 2010, at 13:30 , Toby Inkster wrote:
>
>> On Fri, 2010-06-04 at 10:36 +0200, Ivan Herman wrote:
>>> There is currently no method to remove a triple from a store. I wonder
>>> whether there are reasons to add this facility...
>>
>> Right now, I suppose the workaround would be to create a new store,
>> iterate through the old store, adding each triple to the new one except
>> for those you wanted to remove, and then replace any references to the
>> old store with references to the new store. That's not an especially
>> nice solution though.
>
> That is a typical British understatement:-)
>
> To be fair, I still have to have a clear use case when one wants that. At least for browser-style Web applications even the triple adding is really really important for parsers, I guess...
>
> Ivan
>
>>
>> --
>> Toby A Inkster
>> <mailto:mail@tobyinkster.co.uk>
>> <http://tobyinkster.co.uk>
>>
>
>
> ----
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> PGP Key: http://www.ivan-herman.net/pgpkey.html
> FOAF: http://www.ivan-herman.net/foaf.rdf
>
>
>
>
>
>

Received on Friday, 4 June 2010 12:11:16 UTC