chapter seven

7 Data Modeling in Practice

 

This chapter covers

  • Applying the principals of data modeling to more complex use cases
  • Performance improvements that come from using generic labels over specific labels
  • Data denormalization techniques to create more efficient graph traversals
  • How to decide if moving properties to the edge will simplify your traversals

So far, we have gone through the process of successfully building our graph application to handle social networking in DiningByFriends.  We walked through the process of developing a graph data model, learned how to traverse our graph database with Gremlin, and demonstrated how to develop a Java application to satisfy the requirements of our application. 

This chapter begins the next phase by extending our application and designing the data model for our recommendation and personalization features of DiningByFriends. In chapter 2, we defined the conceptual models for these two features, and in this chapter, we’ll apply our four-step process to creating the logical data model for these features. 

7.1       Review of Data Modeling Process & Conceptual Data Model

Most of the data modeling work was completed in chapter 2. As a review, recall the process as summarized in Figure XX.

7.1.1   Review of Step 1: Problem Definition

7.1.2   Review of Step 2: Conceptual Data Model

7.1.3   Review of Step 3: Logical Data Model

7.2       Adding a Recommendation Engine to our Data Model

7.2.1   Translate Entities to Vertices

7.2.2   Translate Relationships to Edges

7.2.3   Find and Assign Properties

7.2.4   Check our Model

7.3       Extending our Data Model for Personalization

7.4       Comparing the Results

7.5     Summary