Graph Database Path Query Consistency Enforcement
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Applications face challenges in optimizing queries in relational databases due to lack of knowledge about the relational model, leading to suboptimal performance and user experience degradation, especially when dealing with complex relationships.
Innovation Solution
A graph database is used to store data with path consistency enforcement during query processing, employing a data structure with operations like batch expand, zip, unzip, reduce, and stitch to track and enforce path consistency, improving query correctness and flexibility.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a relational database is used to store data, then data can be organized into tables with rows and columns, but applications cannot efficiently extract complicated relationships because they lack knowledge of the relational model
Solution Approach 1:
The patent introduces an object-relational mapper as an intermediary layer between the application and the relational database. This mapper translates application-oriented object models into database-specific SQL queries, allowing applications to work with familiar object structures while the mapper handles the complexity of extracting complicated relationships from the relational model efficiently
Solution Approach 2:
The patent segments the query generation process into multiple components: the application defines high-level object relationships, the object-relational mapper breaks these down into specific SQL join operations, and the database executes the segmented queries. This segmentation allows each layer to optimize for its specific purpose, improving overall query performance
2Adaptability or versatility
If an object-relational mapper is used to help applications understand the relational model, then query capability improves, but it becomes difficult to generate and maintain the mapper for large applications
Solution Approach 1:
The patent enables the object-relational mapper to be generated automatically through code generation tools and reverse engineering from existing database schemas. The mapper can also self-update when database schemas change, reducing manual maintenance burden. Configuration files and metadata-driven approaches allow the system to adapt to schema changes without requiring manual regeneration of the entire mapper
Solution Approach 2:
The patent designs the object-relational mapper with universal interfaces and standardized mapping patterns that work across different database systems and application types. This universality allows a single mapper framework to serve multiple purposes: mapping simple one-to-one relationships, complex many-to-many relationships, inheritance hierarchies, and collections, reducing the need for application-specific mapper code
3Ease of operation
If a key-value store is used instead of a relational database, then applications can access data as objects in memory, but it becomes difficult to optimize the store and extract complicated relationships
Solution Approach 1:
The patent enhances the key-value store by adding a graph dimension to the traditional flat structure. It introduces the ability to define and traverse paths between keys, creating a multi-dimensional access model where data can be retrieved both through direct key access and through path-based relationship traversal, enabling efficient extraction of complicated relationships while maintaining simple key-value access patterns
Data Source
AI summary
The disclosed embodiments provide a system for processing queries of a graph database. During operation, the system stores intermediate results of the query in a structure comprising rows in a set of tables and links between pairs of rows in different tables in the set of tables. Next, the system tracks, in the structure, representations of data, relationships, and path consistency in the query. The system then applies one or more operations to existing rows in the structure to generate a final result of the query. Finally, the system provides the final result in a response to the query.


