Graph Algorithms in SQL
Strongly Connected Components
The Strongly Connected Components algorithm finds sets of connected nodes in a directed graph. A directed graph is a graph that has a path from each node to every other node. A set is considered a strongly connected component if there is a directed path (relationship) between each pair of nodes within the set. On the other hand, if the nodes are only connected through one direction that would be considered a weakly connected component.
Strongly connected components identified
Sample use cases
Financial
Finding groups of firms in which every member owns shares directly or indirectly, of every other member’s shares
Social Media
Suggesting commonly liked pages or games to people in a connected group
Machine Learning
Testing correctness of various components in machine learning models
Telecommunications
Measuring routing performance in multi-hop wireless networks
Transportation
Modeling road networks in vehicle routing applications