Gain hands-on experience with SPARQL, the RDF query language that’s bringing new possibilities to semantic web, linked data, and big data projects. This updated and expanded edition shows you how to use SPARQL 1.1 with a variety of tools to retrieve, manipulate, and federate data from the public web as well as from private sources.
Author Bob DuCharme has you writing simple queries right away before providing background on how SPARQL fits into RDF technologies. Using short examples that you can run yourself with open source software, you’ll learn how to update, add to, and delete data in RDF datasets.
Get the big picture on RDF, linked data, and the semantic web
Use SPARQL to find bad data and create new data from existing data
Use datatype metadata and functions in your queries
Learn techniques and tools to help your queries run more efficiently
Use RDF Schemas and OWL ontologies to extend the power of your queries
Discover the roles that SPARQL can play in your applications
Chapter 1 Jumping Right In: Some Data and Some Queries
The Data to Query
Querying the Data
More Realistic Data and Matching on Multiple Triples
Searching for Strings
What Could Go Wrong?
Querying a Public Data Source
Chapter 2 The Semantic Web, RDF, and Linked Data (and SPARQL)
What Exactly Is the “Semantic Web”?
URLs, URIs, IRIs, and Namespaces
The Resource Description Framework (RDF)
Reusing and Creating Vocabularies: RDF Schema and OWL
SPARQL’s Past, Present, and Future
The SPARQL Specifications
Chapter 3 SPARQL Queries: A Deeper Dive
More Readable Query Results
Data That Might Not Be There
Finding Data That Doesn’t Meet Certain Conditions
Searching Further in the Data
Searching with Blank Nodes
Eliminating Redundant Output
Combining Different Search Conditions
FILTERing Data Based on Conditions
Retrieving a Specific Number of Results
Querying Named Graphs
Queries in Your Queries
Combining Values and Assigning Values to Variables
Creating Tables of Values in Your Queries
Sorting, Aggregating, Finding the Biggest and Smallest and...
Querying a Remote SPARQL Service
Federated Queries: Searching Multiple Datasets with One Query
Chapter 4 Copying, Creating, and Converting Data (and Finding Bad Data)
Query Forms: SELECT, DESCRIBE, ASK, and CONSTRUCT
Creating New Data
Finding Bad Data
Asking for a Description of a Resource
Chapter 5 Datatypes and Functions
Datatypes and Queries
Chapter 6 Updating Data with SPARQL
Getting Started with Fuseki
Adding Data to a Dataset
Changing Existing Data
Chapter 7 Query Efficiency and Debugging
Efficiency Inside the WHERE Clause
Efficiency Outside the WHERE Clause
Chapter 8 Working with SPARQL Query Result Formats
Bob DuCharme (http://www.snee.com/bob) is a solutions architect at TopQuadrant, a provider of software for modeling, developing, and deploying semantic web applications. He came to TopQuadrant from Innodata Isogen, where he did system and architecture analysis and design for a wide range of global publishing clients as well as cochairing the 2008 Linked Data Planet conference in New York City. Earlier in his career, he oversaw SGML and XML development at Moody's Investors Service and then moved on to LexisNexis, where he did data and systems architecture as they made the transition to XML-based systems.
In the XML.com newsletter, editor Kendall Clark once wrote “Does anyone write tech prose as clear as Bob?” Bob is the author of Manning Publications’ “XSLT Quickly,” Prentice Hall’s “XML: The Annotated Specification” and “SGML CD,” and McGraw Hill’s “Operating Systems Handbook.” He's written over 70 pieces for XML.com and has contributed to Dr. Dobb’s Journal, IBM developerWorks, Nodalities, DevX, perl.com, XML Magazine, XML Journal, XML Developer, O’Reilly Books’ “XML Hacks,” and Prentice Hall’s “XML Handbook.” Bob received his BA in Religion fromColumbia University and his Master’s in Computer Science from New York University. He lives in Charlottesville, Virginia, with his wife Jennifer and their daughters Madeline and Alice.