[Paper Review] Reducing Property Graph Queries to Relational Algebra for Incremental View Maintenance
This paper presents a novel approach to enable incremental view maintenance (IVM) for property graph queries by reducing them to flat relational algebra through nested relational algebraic representations. The method leverages discrimination networks and relational IVM techniques to efficiently maintain query results upon data updates, marking the first comprehensive solution for IVM in property graph databases using openCypher as a target language.
The property graph data model of modern graph database systems is increasingly adapted for storing and processing heterogeneous datasets like networks. Many challenging applications with near real-time requirements -- e.g. financial fraud detection, recommendation systems, and on-the-fly validation -- can be captured with graph queries, which are evaluated repeatedly. To ensure quick response time for a changing data set, these applications would benefit from applying incremental view maintenance (IVM) techniques, which can perform continuous evaluation of queries and calculate the changes in the result set upon updates. However, currently, no graph databases provide support for incremental views. While IVM problems have been studied extensively over relational databases, views on property graph queries require operators outside the scope of standard relational algebra. Hence, tackling this problem requires the integration of numerous existing IVM techniques and possibly further extensions. In this paper, we present an approach to perform IVM on property graphs, using a nested relational algebraic representation for property graphs and graph operations. Then we define a chain of transformations to reduce most property graph queries to flat relational algebra and use techniques from discrimination networks (used in rule-based expert systems) to evaluate them. We demonstrate the approach using our prototype tool, ingraph, which uses openCypher, an open graph query language specified as part of an industry initiative. However, several aspects of our approach can be generalised to other graph query languages such as G-CORE and PGQL.
Motivation & Objective
- To address the lack of incremental view maintenance (IVM) support in modern property graph databases, which is critical for real-time applications like fraud detection and recommendation systems.
- To overcome challenges in applying traditional relational IVM techniques to property graphs, including schema-optional models, nested data structures, and complex operations like aggregations and reachability.
- To enable efficient, continuous query evaluation by compiling openCypher queries into relational algebra and maintaining them incrementally using established IVM techniques.
- To generalize the approach to support advanced query features such as optional/anti-patterns, transitive closures, and non-distributive aggregations.
- To lay the foundation for integrating property graph query processing with RDBMS-based systems through incremental evaluation.
Proposed method
- Compiling property graph queries expressed in openCypher into a nested relational algebra representation to handle complex data structures like maps, lists, and collections.
- Applying a chain of transformations to reduce nested relational algebra expressions into flat relational algebra, enabling compatibility with existing IVM techniques.
- Utilizing discrimination networks—originally developed for rule-based expert systems—to efficiently evaluate and maintain the transformed relational expressions.
- Integrating incremental maintenance mechanisms for key operators such as selection, projection, natural joins, semijoins, antijoins, and outer joins, including support for null values.
- Extending the approach to handle complex aggregations, including non-distributive functions (e.g., min, max, stdev), via summary-delta techniques.
- Supporting reachability queries through transitive closure maintenance using space-time tradeoffs, adapted to the graph context.
Experimental results
Research questions
- RQ1Can property graph queries expressed in openCypher be systematically reduced to flat relational algebra while preserving semantics?
- RQ2How can incremental view maintenance techniques from relational databases be adapted to handle the unique characteristics of property graphs, such as nested data and optional patterns?
- RQ3What transformation pipeline enables efficient and correct incremental evaluation of complex graph queries, including aggregations and reachability?
- RQ4To what extent can existing IVM techniques—especially those based on discrimination networks—be reused for property graph query maintenance?
- RQ5Can the proposed approach be generalized to other graph query languages like G-CORE and PGQL?
Key findings
- The proposed framework successfully reduces a broad class of openCypher queries to flat relational algebra, enabling their incremental maintenance using established IVM techniques.
- The approach supports complex features such as optional and anti-patterns, outer joins, and non-distributive aggregations, which are typically unsupported in prior IVM work.
- The use of discrimination networks allows for efficient change propagation and result update calculation upon data modifications.
- The method enables incremental evaluation of transitive closure queries, albeit with higher memory costs due to exponential space requirements.
- The prototype implementation, ingraph, demonstrates end-to-end support for incremental query evaluation on property graphs using openCypher.
- The work establishes a foundational framework that enables future integration of cost-based optimization and RDBMS-based graph view materialization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.