We present a simple approach to handle recursive SPARQL queries, that is, nested queries that may contain references to the query itself. This powerful feature is obtained by implementing a custom SPARQL function that takes a SPARQL query as a parameter and executes it over a specified endpoint. The behaviour is similar to the SPARQL 1.1 SERVICE clause, with a few fundamental differences: (1) the query passed as argument can be arbitrarily complex, (2) being a string, the query can be created at runtime in the calling (outer) query, and (3) it can reference to itself, enabling recursion. These features transform the SPARQL language into a Turing-equivalent one without introducing special constructs or needing another interpreter implemented on the endpoint server engine. The feature is implemented using the standard Estensible Value Testing described in the recommendations since 1.0; therefore, our proposal is standard compliant and also compatible with older endpoints not supporting 1.1 Specifications, where it can be also a replacement for the missing SERVICE clause.

Computing recursive SPARQL queries

ATZORI, MAURIZIO
2014-01-01

Abstract

We present a simple approach to handle recursive SPARQL queries, that is, nested queries that may contain references to the query itself. This powerful feature is obtained by implementing a custom SPARQL function that takes a SPARQL query as a parameter and executes it over a specified endpoint. The behaviour is similar to the SPARQL 1.1 SERVICE clause, with a few fundamental differences: (1) the query passed as argument can be arbitrarily complex, (2) being a string, the query can be created at runtime in the calling (outer) query, and (3) it can reference to itself, enabling recursion. These features transform the SPARQL language into a Turing-equivalent one without introducing special constructs or needing another interpreter implemented on the endpoint server engine. The feature is implemented using the standard Estensible Value Testing described in the recommendations since 1.0; therefore, our proposal is standard compliant and also compatible with older endpoints not supporting 1.1 Specifications, where it can be also a replacement for the missing SERVICE clause.
2014
978-147994002-8
File in questo prodotto:
File Dimensione Formato  
icsc14poster - computing recursive sparql queries.pdf

Solo gestori archivio

Tipologia: versione editoriale
Dimensione 121.17 kB
Formato Adobe PDF
121.17 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11584/57993
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 8
  • ???jsp.display-item.citation.isi??? 5
social impact