Object Relational Mapper Single Query Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional object relational mapping techniques require multiple query statements to retrieve data from relational databases with complex relationships, leading to duplicative data in result sets and increased execution time, especially in databases with nested tables and multiple parent-child relationships.

Innovation Solution

An object relational mapper generates a single automatically generated query statement using tree representations of relationships, leveraging analytic functions and full outer joins to eliminate duplicates and improve efficiency, allowing for data retrieval from arbitrary nested tables with a single query.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If multiple query statements are used to retrieve data from databases with complex relationships, then complete data retrieval is achieved, but execution time increases and duplicative data appears in result sets

Engineering Contradiction:
Improvedata retrieval completenessVSAvoidquery execution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent combines multiple query statements into a single query by merging the execution of parent table queries and child table queries. The system generates one unified query statement that retrieves data from both parent and child tables in a single database operation, eliminating the need for sequential multiple queries and reducing execution time while maintaining complete data retrieval.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The single generated query statement serves multiple functions simultaneously: it retrieves parent table data, retrieves child table data, and performs the operations that would have required separate queries. This multi-functional query approach allows the system to achieve complete data retrieval across complex relationships without the time penalty of multiple sequential queries.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Quantity of substance

If multiple query statements are used to retrieve data from nested tables, then all nested data is retrieved, but the number of queries increases computational overhead

Engineering Contradiction:
Improvedata retrieval completenessVSAvoidquery statement complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The system merges multiple queries for nested tables into a single unified query statement. By combining the retrieval operations for parent tables and multiple levels of child tables into one query, the system reduces computational overhead while maintaining complete retrieval of all nested data, avoiding the complexity of executing multiple separate queries.

Inventive Principle:
Principle #5Merging (Combining)

3Adaptability or versatility

If conventional object relational mapping is used with multiple queries, then data is retrieved from complex relationships, but duplicative data appears in result sets

Engineering Contradiction:
Improvehandling complex relationshipsVSAvoiddata duplication
Core Design Contradiction:
Adaptability or versatilityVSLoss of information

Solution Approach 1:

The patent merges parent table queries and child table queries into a single unified query that retrieves data from complex relationships in one operation. This unified approach eliminates duplicative data in result sets by coordinating the retrieval of parent and child table data simultaneously, while maintaining the adaptability to handle arbitrary complex relationships between tables.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11500862B2Object relational mapping with a single database query
Publication Date: 2022.11.15 PIVOTAL SOFTWARE INC
  • US11500862B2 patent drawing
  • US11500862B2 patent drawing
  • US11500862B2 patent drawing

AI summary

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for generating an object graph from records of a relational database. One of the methods includes receiving a request to populate a software object with values from a plurality of tables represented in a graph, the plurality of tables stored in a relational database maintained by a database management system, each table comprising one or more respective tuples of values; generating a single query statement that, when executed by the database management system, causes the database management system to retrieve the values from the plurality of tables represented in the graph as a result set; querying the relational database using the single query statement to obtain the result set; and populating the software object with one or more values of the result set.