Graph Algorithm Function Execution in Relational SQL Engine
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing graph analytics systems face issues with external processing requirements, lack of extensibility, and limited support for heterogeneous graph data, particularly requiring expensive data reformatting and lacking the ability to define graphs using complex legacy multi-table schemas without reorganization.
Innovation Solution
The implementation of user-defined graph algorithms within a relational database management system (RDBMS) that supports SQL, allowing for in-database processing, extensibility, and heterogeneous graph support through the use of temporary tables and a Graph Algorithm Function (GAF) framework, enabling arbitrary graph shapes and composite algorithm execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If graph analytics are performed using external processing systems, then graph algorithm execution efficiency is improved, but data movement cost and system complexity increase
Solution Approach 1:
The patent merges graph analytics capabilities directly into the relational database management system by integrating graph algorithm functions with SQL query execution. This eliminates the need for external processing systems and costly data extraction/loading operations, as graph algorithms now execute in-database on the existing relational data infrastructure.
2Speed
If graph algorithms are implemented as built-in operations, then processing speed is improved, but system extensibility deteriorates
Solution Approach 1:
The patent creates a universal graph algorithm framework where user-defined functions can be registered and executed within the SQL engine. This multi-functional approach allows both built-in graph algorithms and user-customized algorithms to coexist, maintaining high processing speeds while enabling easy extension of graph analytics capabilities without modifying the core engine.
Solution Approach 2:
The system dynamically registers and loads graph algorithm functions at runtime through a function registry mechanism. This dynamic approach allows new graph algorithms to be added without recompiling or reconfiguring the database engine, providing both fast execution and high extensibility.
3Device complexity
If homogeneous graph structures are used, then system simplicity is improved, but support for complex legacy schemas deteriorates
Solution Approach 1:
The patent segments graph data into multiple heterogeneous vertex tables and edge tables that can represent different entity types and relationships. Each table can have its own schema structure, allowing the system to model complex legacy multi-table schemas while maintaining a unified graph view through the SQL query interface.
Data Source
AI summary
Techniques described herein allow a user of an RDBMS to specify a graph algorithm function (GAF) declaration, which defines a graph algorithm that takes a graph object as input and returns a logical graph object as output. A database dictionary stores the GAF declaration, which allows addition of GAFs without changing the RDBMS kernel. GAFs are used within graph queries to compute output properties of property graph objects. Output properties are accessible in the enclosing graph pattern matching query, and are live for the duration of the query cursor execution. According to various embodiments, the declaration of a GAF includes a DESCRIBE function, used for semantic analysis of the GAF, and an EXECUTE function, which defines the operations performed by the GAF. Furthermore, composition of GAFs in a graph query is done by supplying, as the input graph argument of an outer GAF, the result of an inner GAF.


