Learning SPARQL

Author: Bob DuCharme
Publisher: O'Reilly
Pages: 386
ISBN: 978-1449371432
Aimed at: developers who want to learn SPARQL
Rating: 4.5
Reviewed by: Kay Ewbank

SPARQL is a technology that’s more important than you may realize, making this book equally important.

Tim Berners-Lee, inventor of the Web and director of W3C, says:

“Trying to use the Semantic Web without SPARQL is like trying to use a relational database without SQL”.

The semantic web, of course, is the W3C backed concept that the current web should be converted from unstructured documents to a ‘web of data’. The concept is closely allied to that of the Resource Description Framework (RDF). RDF is a set of W3C specifications that started life as a metadata model, and has moved on to become a general method of modeling web data.

Banner

 

So if SPARQL is going to be a major language for working with web data, learning it is a good idea, which is where this book comes in. This is very much a book for developers, heavy on code and examples. DuCharme starts with a chapter titled ‘Jumping Right In’, where he introduces you to a sample data file in Turtle RDF format, then moves on to how you’d query the file. He then introduces more realistic data and queries, all before page 10!

Having got you started and shown the practical use of SPARQL, the next chapter does look at what exactly the Semantic Web, RDF and SPARQL is all about. From then onwards, though, the chapters are back to SPARQL, starting with a more in-depth look at how to form SPARQL queries, adding filters, combining search conditions, querying named graphs, sorting and aggregating.

 

sparql

By Chapter 4 we’re on to copying, creating and converting data, including how to identify any bad data. The way SPARQL lets you deal with data that doesn’t conform to rules is interesting and given the quality of much of the information on the Web, is probably among its more useful options!

Using datatypes and functions in queries is the subject of the next chapter; essentially SPARQL 1.1 has many new functions for working with numeric values, dates and times, and strings. Update functions get a chapter of their own, including working with named graphs. There’s a good chapter on query efficiency and debugging, and another useful chapter on working with SPARQL query result functions using results in XML, JSON, CSV and TSV formats.

Chapter 9 looks at RDF schema, OWL (the Web Ontology Language), and inferencing. RDFS and OWL let you define and describe classes and properties that a dataset’s triples (identifier, property name, value) might use, and inferencing is the act of working out new triples from existing triples. DuCharme describes the process nice and clearly with minimal jargon. Next comes a chapter on building applications with SPARQL that introduces you to various SPARQL processors and shows how to use SPARQL from HTTP. This chapter was more of an introduction than an in-depth how-to, but at least points you in the right direction. The book closes with a SPARQL cookbook, essentially a set of problems and solutions showing the answers to questions such as ‘How do I treat a URL as a String?’, and ‘How do I Globally Replace a Property Value?’

This is a good book for developers who know how to program, ideally know SQL, and who want to find out about SPARQL. It has plenty of well-constructed examples, and should get you well on the way to being able to use SPARQL in your apps.

 

 

Banner


Code: The Hidden Language of Computer Hardware and Software 2nd Ed

Top Book 2023
Author: Charles Petzold
Publisher: Microsoft Press
Date: August 2022
Pages: 480
ISBN: 978-0137909100
Print: 0137909101
Kindle: B0B123P5GV
Audience: General
Rating: 5
Reviewer: Mike James
Code! We all need to know about it.



Database Design for Mere Mortals: 25th Anniversary Edition

Author: Michael J Hernandez
Publisher: Addison-Wesley
Pages: 680
ISBN: 978-0136788041
Print: 0136788041
Kindle: B08JLXKJ6S
Audience: Database developers
Rating: 5
Reviewer: Kay Ewbank

As the title of this book suggests, this is a title that has stood the test of time, and this updated 4th Edition has bee [ ... ]


More Reviews