NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Graph Processing in RDBMSs

Kangfei Zhao, Jeffrey Xu YuIEEE Data Eng. Bull 2017

Introduction

As graph-structured data—ranging from social networks to biological pathways—continues to grow in scale, developers face a persistent architectural dilemma. High-performance analytics often require specialized graph processing systems like Pregel or Giraph. However, these systems frequently lack the robust data management features, such as ACID transactions and complex multi-table joins, that are standard in Relational Database Management Systems (RDBMS). Conversely, traditional SQL is often criticized as inefficient for the iterative traversals and complex algorithms inherent in graph processing. This research explores bridging this gap by extending relational algebra with "graph-aware" operations, transforming the RDBMS into a viable engine for large-scale graph analytics.

Methodology: Extending Relational Algebra

The core of the proposed approach is the introduction of four specialized relational algebra operations designed to map directly to common graph computation patterns:

  1. MM-join (Matrix-Matrix Join): Facilitates algorithms requiring the multiplication of two matrices, represented as relations.
  2. MV-join (Matrix-Vector Join): Supports interactions between a matrix and a vector, such as updating node ranks based on edge weights.
  3. Anti-join: Enables the pruning of nodes and edges that are no longer relevant to subsequent computation steps, a critical requirement for algorithms like Topological Sort.
  4. Union-by-update: This novel operation addresses the "inflationary" limitation of standard SQL recursion. While standard recursion only allows for the addition of new rows, union-by-update permits non-inflationary semantics where values (e.g., PageRank scores) can be updated or overwritten in each iteration.

To ensure stability and correctness, the authors employ XY-stratification techniques from DATALOG. This provides a mathematical guarantee that recursive processes involving non-monotonic operations (like anti-join) will reach a unique, stable "fixpoint."

Comparison of recursive query features across major RDBMS.

The necessity for these extensions is underscored by the current state of RDBMS support for recursive features. As shown in the table above, while most systems support basic linear recursion, they often lack support for nonlinear recursion, mutual recursion, and critical operations within recursive queries like aggregation or negation.

Experimental Setup

The feasibility of these operations was evaluated using nine large-scale, real-world datasets spanning social networks, RDF data, knowledge graphs, and road networks. The experiments were conducted across three major database platforms: Oracle, IBM DB2, and PostgreSQL, providing a broad view of how these algebraic extensions perform in diverse environments.

Key Insights: Graphs as Linear Algebra

A fundamental insight of this work is that most graph algorithms can be expressed as operations over a semiring. By treating relations as matrices and vectors, a standard "Join + Group-by + Aggregation" sequence becomes functionally equivalent to matrix multiplication. This suggests that RDBMS are architecturally closer to being graph-ready than previously assumed; the primary hurdle is the lack of high-level abstractions and control structures (like a "While" loop combined with destructive updates) to manage iterative logic efficiently.

Results and Algorithm Support

The framework demonstrates broad applicability, successfully supporting a wide array of complex algorithms:

  • Traversal & Connectivity: Breadth-First Search (BFS) and Connected Components.
  • Ranking & Centrality: PageRank, SimRank, and HITS.
  • Structural Analysis: K-core decomposition.

By integrating DATALOG-inspired stratification into SQL'99 recursive WITH clauses, the authors achieved stable results even for complex, non-monotonic operations. The study concludes that RDBMS can process these algorithms in "reasonable time," suggesting that for many enterprise use cases, a specialized graph database may be redundant if the underlying RDBMS is properly optimized.

Limitations and Future Directions

While the current framework is robust, it does not yet support highly complex spectral analytics that require matrix inversion. Furthermore, while the logic is sound, there remains a significant performance gap compared to specialized systems. Future work will focus on optimizing database kernels for these operations, exploring main-memory RDBMS architectures, and developing more efficient parallel join processing and specialized storage formats to make RDBMS truly competitive in the high-performance graph processing landscape.

Summary updated

BibTeX
@article{zhao2017graph,
  author = {Kangfei Zhao and Jeffrey Xu Yu},
  title = {{Graph Processing in RDBMSs}},
  journal = {IEEE Data Eng. Bull.},
  year = {2017},
}
Figure