from Wikipedia, the free encyclopedia

SPARQL ( pronunciation ? / I ) is a graph-based query language for RDF . The name is a recursive acronym for S PARQL P rotocol A nd R DF Q uery L anguage. Audio file / audio sample

The RDF Data Access Working Group (DAWG) of the World Wide Web Consortium drove the development and standardization of SPARQL. In April 2006, SPARQL was recognized as a Candidate Recommendation , but in October 2006 it was downgraded to a Working Draft . Since June 2007, SPARQL was again available as a candidate recommendation from the W3C. On January 15, 2008, SPARQL was finally approved as a recommendation by the W3C. The W3C Recommendation for SPARQL 1.1 has been published since March 21, 2013. SPARQL is the successor to several query languages ​​(e.g. RDF Query Language , RDQL ) that also access RDF data.

An example

The query in the following example finds the names of all African capitals and the country in which each capital is located.

  PREFIX abc: <>
  SELECT ?capital ?country
    ?x abc:cityname   ?capital  ;
        abc:isCapitalOf  ?y     .
    ?y abc:countryname  ?country  ;
        abc:isInContinent abc:Africa .

Variables are marked with a preceding "?" ("$" Is also possible as an alternative). As a result of the query in the example above, all variable assignments for "? Capital" and "? Country" that meet the four defined RDF triples are returned. If a triple ends with a semicolon, its subject completes the following pair to a triple. In this example, abc:isCapitalOf ?ythe short form is ?x abc:isCapitalOf ?y.

Because writing out the URIs reduces the readability of a query, prefixes can be used. Here is an "abc:" for ""

Request engines

  • ARQ - request engine within the Jena Semantic Web Framework
  • Joseki - Extends ARQ with a SPARQL endpoint for remote access
  • D2R Server - wrapper for relational databases and makes the data contained therein available via a SPARQL endpoint
  • Ontop - Also a wrapper for relational databases, which makes the data contained therein available via a SPARQL endpoint
  • ARC - query engine for PHP
  • DARQ - Extends ARQ and supports distributed queries to various data sources
  • Erfurt - query engine for PHP (used within OntoWiki)
  • Tracker - RDF database for desktop applications and mobile devices
  • DB2 - Starting with version 10, IBM DB2 supports SPARQL as well as efficient storage of RDF graphs
  • LuposDate - Open Source (Java) query engine for SPARQL and RIF available from Github and as a web applet, developed at the University of Lübeck.
  • Virtuoso Universal Server - hybrid database system, for example in. DBpedia used


  • Bob DuCharme: Learning SPARQL. Querying and Updating with SPARQL 1.1 . O'Reilly Media, 2nd edition 2013, ISBN 978-1-4493-7143-2
  • Sanja Jahnke: SPARQLuS: DR conception and implementation of a DESCRIBE operator for RDF . GRIN Verlag, 2008, ISBN 978-3-638-95239-2

Web links

Individual evidence

  1. SPARQL Query Language for RDF . World Wide Web Consortium (W3C). January 15, 2008. Retrieved March 29, 2014.
  2. SPARQL 1.1 Overview . World Wide Web Consortium (W3C). March 21, 2013. Retrieved March 29, 2014.
  3. NoSQL Graph Store (PDF; 585 kB) April 27, 2012
  4. LuposDate Github, July 11, 2012
  5. LuposDate demo applet July 11, 2012