GraphAware Blog - Beginner

Find out what's new in the Neo4j world

Avoid cycles in Cypher queries

26 Apr 2019 by Jan Zak Neo4j Beginner Cypher

Avoid cycles in Cypher queries

There is one common performance issue our clients run into when trying their first Cypher queries on a dataset in Neo4j. When writing a query, be sure that it doesn’t match any cycles, or you can experience unpleasant surprises. Assume the following sample graph and simple query: CREATE (a:Node {name: "A"}), (b:Node {name: "B"}), (c:Node {name: "C"}), (a)-[:TO {name: "1"}]->(b), (a)-[:TO {name: "2"}]->(b), (a)-[:TO {name: "3"}]->(b), (b)-[:TO {name: "4"}]->(c) MATCH p=({name: "A"})-[*..10]-({name: "C"}) RETURN p The query returns 9 paths, instead of 3 as you might have guessed! The additional 6 paths have length 4 with node pattern A-B-A-B-C, note...

Lean Dependencies- Reduce Project Delivery Chaos with Graphs

20 Feb 2019 by Luanne Misquitta Neo4j Beginner

Lean Dependencies- Reduce Project Delivery Chaos with Graphs

Dependencies, like graphs, are everywhere. Achieving a goal is rarely possible in a vacuum and requires collaboration between individuals and/or processes. Eliminating dependencies completely is unrealistic- they are a part of life- but they can be streamlined to improve efficiency and reduce friction. In this blog post, we use the example of software projects, but dependency management can very well be applied to many verticals such as supply chains, business processes, inventory management and government processes and workflow. Quite a few organizations struggle as the time draws close to releasing or delivering a version of their software projects. For many,...

Upgrading to Spring Data Neo4j 4.2

30 Sep 2016 by Mark Angrish Neo4j Spring SDN OGM Beginner

Previous articles have shown you how easy using Spring with Neo4j can be. Now the next release of Spring Data Neo4j (SDN), we are going to make this even easier! This post is first in a series that will explore the exciting improvements that will be available in the first candidate release of SDN 4.2, but these are already available in the current snapshot. The main highlights we will be covering include: Brand new Spring configuration method. Tighter integration into Spring transactions with support for transactional event listeners and read only transactions. Paging and sorting support for custom queries. Ability...

(Un)common Use Cases for Graph Databases

18 Apr 2016 by Michal Bachman Neo4j Beginner Modelling

At GraphAware, we live and breathe Neo4j. For three years, we have been helping customers around the world embrace this amazing technology as a solution to many interesting problems. Mainstream applications of graphs, such as real-time recommendations, 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 over some of the less obvious, though equally interesting and intellectually stimulating use cases that we have come across. Rules Engines Whether you’re a startup building a...

Neo4j Events (Spring/Summer 2015)

27 Mar 2015 by Michal Bachman Neo4j Events Beginner

At GraphAware, we are very excited about the recently released Neo4j 2.2 and would like to share some info about where you can meet us in the next few weeks and months. Come and see us for a chat and learn something new about Neo4j and Graph Databases! On 6th April, Luanne is running a Neo4j Fundamentals training in Bangalore On 29th & 30th April, Vince is speaking about Spring Data Neo4j at Spring I/O in Barcelona On 30th April, Christophe is speaking about Neo4j at a Symfony meetup in Antwerp On 4th May, Michal is doing a Recommendation Engine...

Announcing Spring Data Neo4j 4.0

24 Mar 2015 by Vince Bickers Neo4j Spring SDN Beginner

Over the last few months, GraphAware, Neo4j, and Pivotal engineers have been working on a ground-up reimplementation of Spring Data Neo4j (SDN) that is server-first and Cypher-centric. Today we are very excited to announce the first milestone of the new Spring Data project for Neo4j. Server-first! While Neo4j has the ability to run embedded or as a regular server-side database, a lot of users favor traditional deployments where the database can scale independently of application servers. Neo4j server has provided the capability to do this for some time now but when the original version of SDN was written, it was...

Neo4j Events (Jan/Feb 2015)

16 Jan 2015 by Michal Bachman Neo4j Events Beginner

There is no better way to start 2015 than to learn something new. In the wake of two recent major announcements (here and here), Neo4j is as hot as ever, so it might well be the next skill you pick up or improve. Here’s a list of Neo4j events organised by GraphAware around the world in the next few weeks. We’ll be delighted to see you there! On 17th January, Luanne is running a Graph Data Modelling training in Bangalore On 19th January, I’m speaking about Recommendation Engines at Neo4j Expert Talks in Berlin On 21st January, Christophe is showing...

GraphAware Neo4j ChangeFeed

27 Aug 2014 by Luanne Misquitta Neo4j GraphAware Beginner

In this post, we’d like to introduce the first version of the GraphAware Neo4j ChangeFeed - a GraphAware Runtime Module that keeps track of changes made to the graph. GraphAware ChangeFeed Module Every time a transaction commits successfully, all changes made to the graph as a result of the transaction are recorded as a change set. A change includes additions, modifications and deletions of nodes, relationships, labels, and properties. Each change set has a UUID, a set of changes that occurred in the same transaction, and a timestamp which is allocated at the time the transaction starts committing. The module...

Cypher MERGE Explained

31 Jul 2014 by Luanne Misquitta Neo4j Beginner Cypher

With MERGE set to replace CREATE UNIQUE at some time, the behavior of MERGE can sometimes be tricky to understand. MERGE Here’s a summary of what MERGE does: It ensures that a pattern exists in the graph by creating it if it does not exist already It will not use partially existing patterns- it will attempt to match the entire pattern and create the entire pattern if missing When unique constraints are defined, MERGE expects to find at most one node that matches the pattern It also allows you to define what should happen based on whether data was created...

Node Degrees in Neo4j 2.1

23 Jul 2014 by Michal Bachman Neo4j GraphAware Beginner

Efficient counting of relationships in Neo4j was the cornerstone of my Master Thesis and the reason the very first GraphAware Framework module called the Relationship Count Module was born. The improvements in Neo4j 2.1 around dense nodes and the addition of getDegree(…) methods on the Node interface made me eager to do some benchmarking around relationship counts again. The improvements in Neo4j 2.1, indeed, make the RelCount module slightly less useful. We’ve decided, however, not to make it obsolete, since it is a useful reference implementation of a GraphAware Framework Transaction-Driven Runtime Module. Instead, we ported the module to Neo4j...

Modelling Data in Neo4j: Qualifying Relationships

24 Oct 2013 by Michal Bachman 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 by using different relationship types versus using relationship properties. Properties as Qualifiers Let’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 of modelling this, and perhaps the first one that springs into mind, is creating a RATED relationship with a rating property that takes on 5 different values: integers 1 though 5. Writing queries using this model is...

Modelling Data in Neo4j: Bidirectional Relationships

11 Oct 2013 by Michal Bachman Neo4j Modelling Beginner

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

Introduction to Neo4j (in Czech)

14 Jan 2013 by Michal Bachman Neo4j Czech Beginner

S laskavým svolením organizátorů konference WebExpo si dovoluji veřejně zpřístupnit záznam své přednášky o Neo4j. Enjoy! WebExpo Prague 2012 - Introduction to Neo4j (Czech) from bachmanm