On 04/09/12 19:39, Paul Gearon wrote:
This is very implementation dependent.
For instance, it is permissible for an RDF database to store the same
triple multiple times. It just needs to make sure there are no
duplicates when it gets around to handling SPARQL requests.
One case of this is for bulk loading of data, it may make sense to
accept all the presented triples into a new structure as if they were
completely new, and to determine if there are duplicates in a
background thread that merges the new structure with existing data.
(In the meantime, queries against the dataset will need to do some
expensive checks for duplicates until the merge is complete, but this
is an implementation detail). Knowledge of how many new triples were
actually asserted isn't available until the background thread is
complete, and this could be a long time after the initial load
operation returned. I know of two systems that do just this, and I
believe there are more.
Another reason is because SPARQL has attempted to be compatible with
as many existing systems as possible. This is one of the outcomes of
the committee process. A lot of systems were not returning this
information with an update, so it would not have been appealing to
suddenly start providing it. It's not very easy to get a committee to
commit to something that doesn't appeal to many of it's members.
Regards,
Paul
Everything the SPARQL Update editor (Paul) says.
I'd add three things:
1/ It may be possible to carry out a request and not know what the count is.
2/ A request can be many operations: how would the answers get back?
Another result format?
3/ There's an elephant in the room.
1 ==>
consider these examples:
DROP ALL
or
DELETE WHERE { GRAPH <http://example/g> { ?s ?p ?o }
or
DELETE WHERE { ?s rdfs:label ?o }
There are ways of providing that without knowing the count.
3 ==>
I'd like to see queries and updates mixed in one request. But it is
tricky. It needs a compound return format (minor technical detail; see
2) and also brings in an elephant in the form of asking a query and
operating on the results in the same request. That very quickly becomes
a scripting language.
Andy