2 Graph data modeling

 

This chapter covers

  • Defining project goals and terminology with business or end users
  • Building a conceptual data model for the entities and their relationships
  • Translating a conceptual data model into a graph data model
  • Comparing graph data modeling concepts to relational data modeling concepts
  • Constructing the graph data model for our social network use case

Let’s say you want to build a fire pit in your backyard. How would you approach this problem? Would you just start building something and hope that it comes out all right, or would you sit back and draw a picture of what you want to accomplish? When building anything, be it software or a backyard fire pit, it’s crucial that you start with a good mental picture of the end result. This picture needs to include the scope that the solution addresses and the requirements to complete the solution. The more details this picture provides, the easier it is to build the solution.

In software, a significant part of the mental picture is the data model. A well-thought-out data model with a helpful level of abstraction and consistent naming conventions is intuitive to work with, maybe even a joy to use. This is as true with graph databases as it is with any other type of database. But graphs add a twist--modeling relationships with greater sophistication. And therein lies our challenge: we need to create a data model that succinctly expresses these relationships, yet with a high level of detail.

2.1 The data modeling process

2.1.1 Data modeling terms

2.1.2 Four-step process for data modeling

2.2 Understand the problem

2.2.1 Domain and scope questions

2.2.2 Business entity questions

2.2.3 Functionality questions

2.3 Developing the whiteboard model

2.3.1 Identifying and grouping entities

2.3.2 Identifying relationships between entities

2.4 Constructing the logical data model

2.4.1 Translating entities to vertices

2.4.2 Translating relationships to edges

2.4.3 Finding and assigning properties

2.5 Checking our model

Summary

sitemap