3.2. Creating graphs

This section discusses creating named and anonymous graphs to be used for algorithm computation in the Neo4j Graph Data Science library.

In order for any algorithm in the GDS library to run, we must first create a graph to run on. The graph is created as either an anonymous graph or a named graph. An anonymous graph is created for just a single algorithm and will be lost after its execution has finished. A named graph is given a name and stored in the graph catalog. For a detailed guide on all graph catalog operations, see Section 4.1, “Graph Catalog”.

Creating a named graph has several advantages:

Using an anonymous graph has the advantage that a single query may be used for an entire algorithm computation. This can be especially useful in the development phase when the workflow is being set up and the graph projections are experimented with.