|Graph Databases in Action (Manning)|
Author: Dave Bechberger and Josh Perryman
This book sets out to give developers building applications using graph databases an understanding of graphs, graph databases, and how to interact with them from an application.
The ideal reader of this book would be a programmer with a reasonable knowledge about writing apps for SQL databases, and who now needs to write apps that work with graph databases. You do learn about graph databases along the way, but essentially it's about how to write the app.
The book opens with a brief overview of what graphs and graph databases are, and how to identify if your application is a graph problem. This is followed by a chapter on graph data modeling that includes a discussion on creating a conceptual model, and taking that as the basis of a logical data model.
The next three chapters get down to the problem of navigating through the graph and returning data from it, beginning with how to run basic and recursive transversals through a graph. As with most of the book, the examples use Apache Tinkerpop's Gremlin as the query language and Java as the programming language. Gremlin isn't the most popular graph query language - Cypher and OpenCypher are more widely used, but the authors say they wanted their examples to be portable across different graph databases.
Having shown how to perform a transverse of the graph, the next chapter expands this to graph transversals with data mutation, i.e. changing the graph by adding, modifying or deleting vertices, edges or properties. The authors then look at formatting the results returned by the transversals.
This first part of the book ends with a chapter on developing an application, connecting to the database, retrieving data, adding, modifying and deleting data, and translating the list and path tranversals into methods in the application.
Part two of the book extends the application started at the end of part one, starting by extending the data model for more complex uses such as recommendation engines. The recommendation engine is then extended to show how to use a known-walk pattern to create a stronger recommendation engine. Known-walk patterns are those where you (or your application) knows the vertices and edges that should be transversed to find something. This part of the book conclused with a look at adding personalization - filtering the data based on the connections of a particular user.
The final part of the book is titled Beyond the basics, and discusses how to troubleshoot performance problems with transversals, what supernodes are (nodes with a large number of incident edges) and why they cause problems, and how to deal with anti-patterns such as the application use not really being suitable for a graph database, dirty data and transverses without parameters.
The final chapter looks at where to go next in graph-backed applications, common algorithms and how to apply them to specific problems, and using graphs in machine learning apps.
Verdict: Overall, I felt this book was a good introduction to creating applications for graph databases. For a programmer used to working with standard SQL databases, working with graphs represents a radical change in the way you think and the way you work, and this book explains the concepts that you need to grasp. You might well have to use a different query language in your real-life graph app, but by the end of the book you should understand more clearly what graph databases are all about.
|Last Updated ( Saturday, 29 May 2021 )|