SPARQL, aka SPARQL Protocol and RDF Query Language, is a query language created in 2008.
#257on PLDB | 16Years Old | 0Repos |
SPARQL (pronounced "sparkle", a recursive acronym for SPARQL Protocol and RDF Query Language) is an RDF query language, that is, a semantic query language for databases, able to retrieve and manipulate data stored in Resource Description Framework (RDF) format. It was made a standard by the RDF Data Access Working Group (DAWG) of the World Wide Web Consortium, and is recognized as one of the key technologies of the semantic web. On 15 January 2008, SPARQL 1.0 became an official W3C Recommendation, and SPARQL 1.1 in March, 2013. Read more on Wikipedia...
SELECT ?h WHERE {
VALUES ?h { "Hello World" }
}
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name ?email
WHERE {
?person a foaf:Person.
?person foaf:name ?name.
?person foaf:mbox ?email.
}
PREFIX ex: <http://example.com/exampleOntology#>
SELECT ?capital
?country
WHERE
{
?x ex:cityname ?capital ;
ex:isCapitalOf ?y .
?y ex:countryname ?country ;
ex:isInContinent ex:Africa .
}
add as asc ask base by clear construct copy create data delete desc describe distinct drop false filter from graph group having in insert limit load minus move named not offset optional order prefix reduced select service silent to true undef union using values where with
Feature | Supported | Example | Token |
---|---|---|---|
Integers | ✓ | # [+\-]?\d+ | |
Floats | ✓ | # [+\-]?(\d+\.\d*[eE][+-]?\d+|\.?\d+[eE][+-]?\d+) | |
Booleans | ✓ | true false | |
Strings | ✓ | "Hello world" | " |
Comments | ✓ | # A comment | |
Line Comments | ✓ | # A comment | # |