- Special Upgrade Offer
- Foreword
- Preface
- 1. Introduction
- 2. Options for Storing Connected Data
- 3. Data Modeling with Graphs
- 4. Building a Graph Database Application
- 5. Graphs in the Real World
- 6. Graph Database Internals
- 7. Predictive Analysis with Graph Theory
- A. NOSQL Overview
- Index
- About the Authors
- Colophon
- Special Upgrade Offer
- Copyright

In this chapter we’re going consider analytical techniques and algorithms for processing graph data. Both graph theory and graph algorithms are mature and well-understood fields of computing science and we’ll demonstrate how both can can be used to mine sophisticated information from graph databases. Although the reader with a background in computing science will no doubt recognize these algorithms and techniques, the discussion in this chapter is handled without recourse to mathematics, to encourage the curious reader to dive in.

Before we look at higher-order analytical techniques we need to reacquaint ourselves with the fundamental *breadth-first search* algorithm, which is the basis for iterating over an entire graph. Most of the queries we’ve seen throughout this book have been *depth-first* rather than *breadth-first* in nature. That is, they traverse outward from a starting node to some end node before repeating a similar search down a different path from the same start node. Depth-first is a good strategy when we’re trying to follow a path to discover discrete pieces of information.