Chapter 1 gave you your first taste of writing and running SPARQL queries. In this chapter, we’ll dig into more powerful features of the SPARQL query language:
URIs are important for identifying and linking things, but when it’s time to display query results in an application, users want to see information they can read, not something that looks like a bunch of web addresses.
In Chapter 1, we started learning how to request data that matches certain patterns. When you can ask for data that may or may not match certain patterns, it makes your queries more flexible, which is especially useful when exploring data you’re unfamiliar with.
Much of SPARQL is about retrieving data that fits certain patterns. What if you want the data that doesn’t fit a particular pattern—for example, to clean it up?
SPARQL offers some simple ways to ask for a set of triples and additional triples that may be connected to them.
If you’re looking for triples that fit some pattern, and a SPARQL query engine finds multiple instances of certain values, it will show you all of them—unless you tell it not to.
SPARQL lets you ask, in one query, for data that fits certain patterns and other data that fits other patterns; you can also ask for data that meets either of two sets of patterns. ...