SPARQL 1.1: querying RDF as a graph
SPARQL is the query language for RDF. You describe a graph pattern; the engine returns the assignments that match it, as a result set or a graph.
What it is
SPARQL 1.1 is the W3C query language for RDF. A query is a graph pattern — variables where terms would be — and evaluation finds the assignments that match the data. It covers optional patterns, UNION alternatives, negation, subqueries, aggregation, property paths and named graphs.
What it gives the knowledge layer
It gives the knowledge layer one question surface over an assembled graph, with joins in the query rather than in application code. Two extensions matter for agents: federated query, where SERVICE lets part of a pattern be evaluated by a remote query service, and graph results, which let derived knowledge be materialised as a queryable graph.
Where the spec lives
The query language is a W3C Recommendation published in March 2013, one of eleven SPARQL 1.1 Recommendations including Update, Federated Query, entailment regimes, the protocol and the Graph Store HTTP protocol. The graph it queries is defined by RDF 1.1 Concepts.
What it does not solve
A query language cannot fix the graph it queries. If facts are stale the query returns them with full confidence; if one entity appears under two identifiers, a join quietly misses matches or duplicates them — see knowledge graphs for identity and PROV-O for provenance. Matching is against the graph as given, so inferring extra triples is the work of entailment regimes.
FAQ
Either a result set or an RDF graph. A SELECT query returns solutions; a CONSTRUCT or DESCRIBE query builds a graph, so derived knowledge can be materialised.
Yes. SPARQL 1.1 Update is a separate Recommendation in the same set, so the family covers changing a graph as well as reading it.
Yes. Federated query, specified in SPARQL 1.1 Federated Query, uses the SERVICE keyword so part of the pattern is evaluated by a remote query service.
Usually because of the graph, not the query. A query language cannot tell that a fact is stale, that one entity appears under two identifiers, or that a required type is missing.
Sources
- SPARQL 1.1 Query Language (W3C Recommendation, 2013)
- RDF 1.1 Concepts and Abstract Syntax (W3C Recommendation)