2.1 · Lesson

Shortest Paths with Cypher

Imagine that you are asked to build a web application that will allow users to find the shortest, or cheapest route between two airports. The user selects an origin and destination airport, and it is the responsibility of the application to suggest routes between them.

As you might imagine, finding the best connections between various airports is a graph problem in a nutshell. You could easily represent airports as Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties., and use Full definition for relationship (opens in a new tab)A named, directed connection between two nodes. Every relationship has a type, a start node and an end node. to model the possible relationships between them.