Chapter 4. Data modeling

 

This chapter covers

  • What is a data model?
  • How to convert tabular data to graph data
  • What about graph databases?
  • What about other key-value stores?

I hope that the first few chapters have convinced you of the value of graphs, but most data isn’t conveniently organized into nodes and links. In this chapter, I’ll show you how to take data in tabular or key-value format and represent it in terms of nodes and links so that it can be visualized. Data is rarely natively organized in a way that’s useful in a graph, so it must be restructured.

Imagine your data as a number of large spreadsheets. In order to visualize this data as a graph, you’d have to pick through the entries in the spreadsheets to determine which entries represent nodes, which entries represent relationships, and which entries can be discarded. That process is called data modeling. A graph model is a logical view of the data elements and their connections to each other, disregarding how the data is stored in a database. A data model is a question you wish to answer with your data. There can be many different graph models of the same data. In this chapter, I’ll show you how to derive a model from different sorts of data and talk about some of the tools such as graph databases that allow you to store the data efficiently in graph format to avoid the modeling task altogether.

4.1. What is a data model?

4.2. Graph data models

4.3. Graph databases

4.4. Summary