Modeling the Book Graph

Recall the book graph we introduced in our first chapter. (You might want to refer back to Modeling a Book Graph, for specific details.) This is a simple reference graph we created to test implementations under different graph models. We’re defining a book catalog where each catalog entry has book, author, and publisher entities and a few basic properties.

We want to implement the book graph now using libgraph. Note that libgraph supports labels that we can use for the node and edge types. And while it allows for node properties, we have to exclude edge properties since libgraph doesn’t natively support them. Of course, this is something of a requirement as far as implementing a property graph is concerned, but we’ll ...

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.