Temporary Tables for Graph Algorithm Results in RDBMS
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing graph analytics systems face challenges such as external processing requirements, lack of extensibility, and limited support for heterogeneous graph data, particularly in relational database management systems (RDBMS), which restrict their ability to handle complex graph queries and algorithms efficiently.
Innovation Solution
The implementation of user-defined graph algorithms within a relational database management system (RDBMS) that supports SQL, allowing for in-query execution and heterogeneous graph support, enabling the declaration of graph algorithms as Graph Algorithm Functions (GAFs) that can operate on arbitrary graph shapes without modifying the query compiler or execution engine.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If graph algorithms are implemented as built-in operations in existing graph analytics systems, then processing efficiency is improved, but system extensibility deteriorates as adding new algorithms requires modification of the processing engine itself
Solution Approach 1:
The patent introduces temporary tables as an intermediary mechanism between the SQL engine and graph algorithm results. These temporary tables store intermediate results of graph algorithms (such as connected components, shortest paths, or centrality measures) in a format that the SQL engine can efficiently process. This allows the SQL engine to leverage its optimized query processing capabilities without requiring direct implementation of graph algorithms, thereby maintaining both processing efficiency and system extensibility.
Solution Approach 2:
The patent segments the graph processing workflow into distinct phases: graph algorithm execution produces results that are stored in temporary tables, which then serve as input for subsequent SQL queries. This segmentation allows independent optimization of each phase - graph algorithms can be implemented as flexible user-defined functions while the SQL engine handles the query processing efficiently, resolving the contradiction between implementation efficiency and extensibility.
2Adaptability or versatility
If heterogeneous graph data is supported by mapping multiple vertex and edge tables, then data representation flexibility is improved, but system complexity increases
Solution Approach 1:
The patent implements a universal graph table interface that can represent both homogeneous and heterogeneous graphs. The GRAPH_TABLE function accepts multiple vertex tables and edge tables as parameters, providing a unified mechanism for defining graph structures. This universal interface handles the complexity of heterogeneous graphs internally while presenting a simple, consistent API to users, thereby improving data representation flexibility without increasing perceived system complexity.
Solution Approach 2:
The patent introduces an intermediary layer in the form of temporary tables that standardize the representation of heterogeneous graph data. When processing heterogeneous graphs with multiple vertex and edge tables, the system creates temporary tables that consolidate the complex multi-table relationships into a unified structure that can be efficiently processed by the SQL engine, thus managing system complexity while supporting flexible data representation.
3Adaptability or versatility
If graph algorithm results are stored in temporary tables for SQL engine processing, then query flexibility is improved, but storage overhead increases
Solution Approach 1:
The patent implements automatic management of temporary tables with scoped lifetimes. Temporary tables storing graph algorithm results are created when needed for SQL processing and are automatically discarded (dropped) when the associated GRAPH_TABLE operation completes. This lifecycle management ensures that storage overhead is minimal - temporary tables exist only transiently during query execution rather than persisting in the database, thus providing query flexibility without significant storage overhead.
Data Source
AI summary
An RDBMS specifies a graph algorithm function (GAF) that takes a graph object as input and returns a logical graph object as output. GAFs are used within graph queries to compute temporary and output properties (“GAF-computed properties”), which are live for the duration of the query cursor execution. GAF-computed output properties are accessible in the enclosing graph pattern matching query as though they were part of the input graph object of the GAF. Temporary cursor-duration tables are generated for the query cursor during compilation of a graph query that includes a GAF, and are used to store the GAF-computed properties. Each temporary table corresponds to one of the primary tables of the input graph, and includes, as a foreign key, primary key information from the corresponding primary table.


