Modeling the Book Graph
We’re going to implement our book graph using the property graph model. First, let’s remind ourselves what this book graph looks like—take a look at this figure, which shows our reference book graph.
This book graph can be mapped into the property graph model as shown in the following figure. As you can see, it maps almost exactly.
Yes, that’s right. It looks like the property graph model has full support for all the features we require.
We can express this book graph in Cypher as:
| // book 1 |
| CREATE |
| (bk1:Book { |
| id: "adopting_elixir", |
| date: "2018-03-14", |
| format: "Paper", |
| isbn: "978-1-68050-252-7", |
| title: "Adopting ... |
Get Exploring Graphs with Elixir now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.