relationship aggregation
Collapsing the parallel 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. between two Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. into one during Full definition for projection (opens in a new tab)An in-memory copy of part of your database that graph algorithms run against. You choose which nodes and relationships it holds., usually carrying their count or sum as its weight.
Example
Ava bought a kettle and a mug. Ben bought six of the same mug.
MATCH (source:Customer)-[:BOUGHT]->(target:Product)
WITH source, target, count(*) AS purchases
RETURN gds.graph.project('customer-products', source, target, {
relationshipProperties: { weight: purchases }
})The projection holds one relationship for each pair of nodes.
Ben's six relationships to the mug become one carrying weight: 6. Ava bought each of two products once, so those come through carrying weight: 1. An algorithm reading weight still counts six purchases for Ben, without following six relationships to do it.
Lessons that use this term
The lesson and course links below open in a new tab.
5 lessons use this term. Results are ordered by term density.
Get started with Graph Data Science10 mentions
- Understand relationship aggregationEssential projection techniquesthis lesson, you'll learn about relationship aggregation—a technique for collapsing multiple parallel relationships into a single weighted relationship during6 mentions
- Challenge: Aggregated projection and analysisEssential projection techniquesConnect Director nodes to Actor nodes through shared Movie nodes Use relationship aggregation to create a weight representing the total number of movies each director-actor pair has worked on together -1 mention
- Practice relationship aggregationEssential projection techniquesthe previous lesson, you learned the theory behind relationship aggregation1 mention
- Module recap and what's nextWorking with algorithmsto aggregate multiple relationships into weighted connections When to use relationship aggregation for performance and insight How to design projections based on analytical questions How to match projection1 mention
- Module recapEssential projection techniques1 mention