SHACL for the Practitioner
SHACL is the World Wide Web Consortium’s (W3C) standard for validating semantic web data. Standards like RDFS and OWL use inference to discover “new” information in graph data based on logical implications and “open world” assumptions. SHACL allows practitioners to constrain the conclusions semantic inference can draw based on established rules for graph entities and attributes.
Key Concepts
- SHACL can be used to catch logical inferences that are “correct” according to your semantic model, but make no sense in the real world.
- SHACL is complementary to OWL, not a replacement for it (35).
- SHACL doesn’t change your graph. When run, the SHACL engine delivers a report detailing constraint violations (76).
- Most commercial semantic web tools support core SHACL constraints, though their implementation of the full standard still varies.
Impressions
My enthusiasm for this (admittedly niche) topic is twofold: First, SHACL for the Practitioner means that we now have a complete set of approachable, reader-friendly books for the semantic web technologies that form the foundations of knowledge graphs (RDFS, OWL, SPARQL, SHACL).
Second, Veronika's clear, accessible style takes what could quickly become a technically obtuse topic and frames it as a pragmatic, down to earth complement to OWL and RDFS.
While SHACL isn't otherwise a starting place I would recommend to someone new to semantic web technologies, part one of this book, "Back to Basics", is hands down the clearest holistic overview I've seen of what the semantic stack seeks to accomplish and how the technologies fit together. Even if you need to come back to the rest of the book for a second pass after you've covered the other technologies elsewhere, this initial framing provides an admirable map for the rest of the semantic web territory.
Parts two and three provide an introduction to the nuts and bolts of designing, writing, and applying SHACL to validate data (of course), and then a selection of real-world case studies ("SHACL Stories") that illustrate the wide variety of applications for which SHACL provides practical data validation at scale. The coverage of SHACL shapes and constraints is concise and to-the-point, and kept relatable with a common example throughout. Some of the case studies were more accessible to me than others, but I suspect this is just right: everyone will bring their own background and experience to these stories, and there's a range of topics here to accommodate that.