GraphAware Blog - Modelling

Find out what's new in the Neo4j world

(Un)common Use Cases for Graph Databases

18 Apr 2016 by Michal Bachman · 3 min read Neo4j Beginner Modelling

At GraphAware, we live and breathe Neo4j. For three years, we have been helping customers around the world embrace thisamazing technology as a solution to many interesting problems. Mainstream applications of graphs, such as real-timerecommendations, fraud detection, impact analysis, and graph-aided search, have been getting a lot of media attention.In the run up to GraphConnect Europe 2016, we would like to illustrate that graphs are truly for everyone by going oversome of the less obvious, though equally interesting and intellectually stimulating use cases that we have come across.Rules EnginesWhether you’re a startup building a mobile application that will help people...

Modelling Data in Neo4j: Labels vs. Indexed Properties

Modelling Data in Neo4j: Labels vs. Indexed Properties

16 Jan 2015 by Christophe Willemsen · 8 min read Neo4j Modelling Cypher Intermediate

A common question when planning and designing your Neo4j Graph Database is how to handle “flagged” entities. This couldinclude users that are active, blog posts that are published, news articles that have been read, etc.IntroductionIn the SQL world, you would typically create a a boolean|tinyint column; in Neo4j, the same can be achieved in thefollowing two ways: A flagged indexed property A dedicated labelHaving faced this design dilemma a number of times, we would like to share our experience with the twopresented possibilities and some Cypher query optimizations that will help you take a full advantage of a the graph...

Modelling Data in Neo4j: Qualifying Relationships

24 Oct 2013 by Michal Bachman · 3 min read Neo4j Modelling Beginner

In the last post of our “Neo4j Modelling for Beginners” series,we looked at bidirectional relationships. In this post, we compare the implications of qualifying relationships byusing different relationship types versus using relationship properties.Properties as QualifiersLet’s say we want to model movie ratings in Neo4j. People have an option to rate a movie with 1 to 5 stars. One way ofmodelling this, and perhaps the first one that springs into mind, is creating a RATED relationship with a ratingproperty that takes on 5 different values: integers 1 though 5.Writing queries using this model is fairly straightforward in both Java and Cypher....

Modelling Data in Neo4j: Bidirectional Relationships

11 Oct 2013 by Michal Bachman · 2 min read Neo4j Modelling Beginner

Transitioning from the relational world to the beautiful world of graphs requires a shift in thinking about data. Althoughgraphs are often much more intuitive than tables, there are certain mistakes peopletend to make when modelling their data as a graph for the first time. In this article, we look at one common sourceof confusion: bidirectional relationships.Directed RelationshipsRelationships in Neo4j must have a type, giving the relationship a semantic meaning, and a direction. Frequently, thedirection becomes part of the relationship’s meaning. In other words, the relationship would be ambiguous without it.For example, the following graph shows that the Czech Republic DEFEATED...