Chapter 7. Using Trees in Production

Whether you are modeling corporate structures or unbounded networks of IoT sensor communication, hierarchical data fits very well into graph technologies.

As we see it, especially with unbounded and hierarchical data, the mental distance between the data on disk and using it is much shorter when you use graph technology. However, as we saw at the end of the previous chapter, simple questions with expressive languages and natural models can open the door to unexpected behavior.

Namely, it is easy to think about starting at the root of a tree and walking all the way down to its leaves. And graph technologies enable the code for this to be quite simple.

However, the simplicity that comes with reasoning about complex, tree-structured problems obfuscates the complexity of processing the data’s natural hierarchical structure.

Chapter Preview: Understanding Branching Factor, Depth, and Time on Edges

This chapter will have four main sections. Each section builds upon the previous one to walk through modeling the time property on edges to resolve our error at the end of Chapter 6.

In the first section, we’ll build upon the data introduced in the last chapter by adding two complexities: time on edges and valid paths. The second section delves into why a valid communication tree reduces the amount of data to process. We will update and walk through the production version of our graph schema in this section. The third and fourth sections of this ...

Get The Practitioner's Guide to Graph Data 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.