Book Image

Learning Neo4j

By : Rik Van Bruggen
Book Image

Learning Neo4j

By: Rik Van Bruggen

Overview of this book

Table of Contents (18 chapters)
Learning Neo4j
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Where to Find More Information Related to Neo4j
Index

Using a graph model for recommendations


We will be using a very specific data model for our recommender system, which is based on the dataset that we imported in the previous chapter. All we have changed is that we added a couple of products and brands to the model, and inserted some data into the database correspondingly. In total, we added the following:

  • Ten products

  • Three product brands

  • Fifty relationships between existing person nodes and the mentioned products, highlighting that these persons bought these products

These are the products and brands that we added:

Adding products and brands to the dataset

The following diagram shows the resulting model:

In Neo4j, that model will look something like the following:

A graph model for our recommender model

A dataset like this one, while of course a broad simplification, offers us some interesting possibilities for a recommender system. Let's take a look at some queries that could really match this use case, and that would allow us to either visually...