chapter seven

7 Advanced Data Modeling Techniques

 

This chapter covers

  • Applying the data modeling process to more complex use cases
  • Improving performance by using generic labels over specific labels
  • Denormalizing data to create more efficient graph traversals
  • Moving properties to edges to simplify traversals

So far we’ve walked through the entire process of building a simple graph application, from data modeling, to traversal construction, to coding a Java application for the recursive and path finding traversals we used in our social network. While the model for our social network was simplistic it allowed us to demonstrate the patterns and processes required to build graph backed applications while showing some of the powerful tools, such as recursive and pathfinding traversals, that graphs bring to the table. 

These basic modeling steps provide us with a strong foundation and work well on the relatively simple social network data model. But as the complexity of our data model increases, the basic steps need to be combined with additional techniques in order to create a logical data model capable of handling any scale of data. Most real-life applications, such as recommendation engines or personalization applications, are more complicated than the one-vertex, one-edge label data model required by our social network. 

7.1            Reviewing our Current Data Models

7.2            Extending our Logical Data Model

7.3            Translate Entities to Vertices

7.3.1                     Generic Labels

7.3.2                     Data Denormalization

7.3.3                     Translate Relationships to Edges

7.3.4                     Find and Assign Properties

7.3.5                     Moving Properties to Edges

7.3.6                     Check our Model

7.4            Extending our Data Model for Personalization

7.5            Comparing the Results

7.6            Summary