Graph Data Science

projection

An in-memory copy of part of your database that graph algorithms run against. You choose which nodes and relationships it holds.

Also written: projections, graph projection, graph projections

Learn more in Project a graph

Example

The database holds customers, products and categories.

cypher
MATCH (source:Customer)-[:BOUGHT]->(target:Product)
WITH gds.graph.project('purchases', source, target) AS g
RETURN g.graphName, g.nodeCount, g.relationshipCount

purchases holds four nodes and three relationships: the two customers, the two products and the [:BOUGHT] relationships joining them.

The (:Category) node and both [:IN_CATEGORY] relationships are not included.

Lessons that use this term

The lesson and course links below open in a new tab.

No published lesson uses this term yet.

All glossary terms