less than 1 minute read

On Friday 24th November speaker Miroslav Blaško gave a speech about Debugging SPARQL Queries using algebra. Video and presentation included.

Semantics of SPARQL queries can be expressed by SPARQL Algebra. Tools like SPARQL Validator provides translation of SPARQL queries into its algebraic representation. The talk will explore a few perplexing examples of SPARQL queries, illustrating how the translation can be used to understand/debug such queries.

Discussion about the evaluation of queries followed, but is not part of the record. Within the discussion we found out that execution of the same query [1] results in two different results in Eclipse RDF4J and Ontotext GraphDB. While Eclipse RDF4J returns one result as expected from the translation to algebra as defined in SPARQL 1.1 W3C Recommendation , Ontotext GraphDB returned two results which is on the other hand more intuitive.

Query [1]:

SELECT ?person ?image
WHERE {
    OPTIONAL { ?person :has-image ?image }   
    ?person a :Person .
}

The presentation slides are available at this link.

Further reading: