The examples use a graph in which nodes represent persons who are geographically distributed across the United States and are connected on an online social network, where they follow each other. The directed edges start at the follower and end at the leader. For example, Alex follows Bob and Casey.
Graph of Social Network

The graph in the figure is represented by the vertices and edges tables friends and followers_leaders, respectively. The edges table column intensity represents the fervor with which the follower follows the leader, on a scale from 1 (lowest) to 10 (highest).
friends_name | location | group_id |
---|---|---|
Alex | SanFrancisco | SanFrancisco |
Bob | LosAngeles | LosAngeles |
Casey | LosAngeles | LosAngeles |
Danny | NewYorkCity | NewYorkCity |
Eve | Birmingham | Birmingham |
Fox | Austin | Austin |
Gohar | Miami | Miami |
Harry | Chicago | Chicago |
follower | leader | intensity |
---|---|---|
Alex | Bob | 5 |
Alex | Casey | 6 |
Casey | Bob | 1 |
Eve | Danny | 9 |
Fox | Danny | 7 |
Fox | Eve | 8 |
Gohar | Casey | 10 |
Harry | Gohar | 4 |
Harry | Danny | 3 |