SPARQL

The SPARQL Protocol and RDF Query Language (SPARQL ) is a query language and protocol for RDF, defined by the specifications:

Together these specifications enable an RDF Linked Dataset to define a SPARQL endpoint, which is a SPARQL conformant protocol service accepting SPARQL queries and returning SPARQL query results. As well as supporting the standard SPARQL XML result format a number of SPARQL endpoint implementations also support other return formats via content negotiation.

The SPARQL query can be sent directly to the SPARQL end point, e.g.

http://dbpedia.org/sparql?query=SELECT ?s ?p ?o where {?s ?p ?o . } LIMIT 10

Or URL encoded, e.g.

http://dbpedia.org/sparql/sparql?query=SELECT+%3Fs+%3Fp+%3Fo+where+{%0D%0A%3Fs+%3Fp+%3Fo+.%0D%0A}%0D%0ALIMIT+10

A SPARQL client such as the Drupal SPARQL Module http://drupal.org/project/sparql can construct a SPARQL query, forward it to a SPARQL endpoint and process the results.

The Vocabulary of Interlinked Datasets (voiD) http://rdfs.org/ns/void/html describes features of RDF Linked Datasets (http://rdfs.org/ns/void#Dataset) including the URI of its SPARQL endpoint (http://rdfs.org/ns/void#sparqlEndpoint), the vocabularies ( http://rdfs.org/ns/void#vocabulary ) (RDFS vocabularies or OWL ontologies) used and even some example resources. This information provides a starting point for exploring a dataset using a SPARQL client. It is assumed that the default graph of the SPARQL endpoint is the dataset itself.

Discogs http://discogs.dataincubator.org/.html is a good example of using void to describe the dataset.

Discovering SPARQL http://blogs.talis.com/nodalities/2009/04/discovering-sparql.php

SPARQL Tutorials

SPARQL End Points

SparqlEndpoints http://esw.w3.org/topic/SparqlEndpoints list a number of SPARQL End Points.

SPARQL End Points can be queried on a command line using wget, e.g.

wget --header="Accept: application/json" "http://localhost/ow/tip/sparql/?query=SELECT ?s WHERE {?s ?p ?o} LIMIT 10" -q -O -

wget --header="Accept: application/sparql-results+json" "http://localhost/ow/tip/sparql/?query=SELECT ?s WHERE {?s ?p ?o} LIMIT 10" -q -O -

SPARQL Online

SPARQL Online provides links to a number of online SPARQL clients. SPARQL queries can be run directly using the webforms provided. Linked Datasets that can be queries include Dbpedia and GeoNames.

SPARQL Resources

SPARQL Resources list some of the available of resources for working with SPARQL.

SPARQL Update

SPARQL is a query only language for RDF. SPARQL/Update is a submission for a SPARQL based update language for RDF. SPARQL Update lists some of the available of resources for updating RDF using SPARQL/Update or similar languages.

SPARQL Extensions

In addition to the proposed SPARQL Update specification there are a number of other proposed SPARQL Extensions.SPARQL Extensions lists some of them.

SPARQL 1.1.Drafts

References