Relational Database Graph Random Walk via Recursive SQL
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for generating random walks on graphs are limited by memory constraints and require data to be imported and exported between graph processing engines, making them inefficient for large-scale graph analysis.
Innovation Solution
The use of recursive SQL to generate random walks through a relational database, where each directed edge is represented as a row in a graph table, allowing for scalable graph processing without the need for in-memory storage and facilitating integration with other data types within the SQL database.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If traditional graph processing methods are used, then random walks can be generated, but memory constraints limit the ability to handle large-scale graphs
Solution Approach 1:
The patent replaces in-memory graph storage with relational database storage, substituting the mechanical memory system with a database system that can handle larger datasets. The graph is represented using relational tables (vertices table, edges table) that can be queried using SQL, eliminating the need to load entire graphs into memory while maintaining the ability to traverse and analyze graph structures.
2Adaptability or versatility
If graph data is stored in relational database, then scalability is improved, but data synchronization issues arise when integrating with other data types
Solution Approach 1:
The patent implements a universal data representation approach where the relational database schema can store multiple data types (graph data, relational data, unstructured data) using the same table structures and query mechanisms. The vertices and edges tables can accommodate various data types through flexible schema design, allowing seamless integration and querying without requiring separate synchronization mechanisms for different data types.
3Productivity
If recursive SQL is used to generate random walks, then processing efficiency improves, but query complexity increases
Solution Approach 1:
The patent segments the random walk generation process into multiple SQL queries that can be executed sequentially or in parallel. Instead of using a single complex recursive query, the system breaks down the random walk into discrete steps: selecting starting vertices, generating first hops, generating subsequent hops, and terminating when criteria are met. This segmentation allows each query to be simpler and more manageable while maintaining overall efficiency.
Data Source
AI summary
Embodiments generate random walks through a directed graph that is represented in a relational database table. Each row of the graph table represents a directed edge in the graph and includes a source vertex and a destination vertex. Each row is further augmented to (a) indicate the number of outbound edges starting from the destination vertex in the row and (b) include an identifier that distinguishes the edge from other outbound edges starting from the same source vertex. An SQL query may be executed on the augmented graph table. Starting from a source vertex (starting vertex or the destination vertex of the previously selected hop) the query randomly selects a row of the graph table representing one of the outbound edges from the source vertex and adds the selected outbound edge as a row in a random walk table that represents the next hop in the random walk.


