Virtual Backward Associations for Bi-directional Data Model Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Uni-directional associations in data models, such as ORM models, limit bi-directional query capabilities, which are supported by services like OData, leading to incomplete query results and increased complexity in data navigation.

Innovation Solution

Inverting associations in an in-memory object representing the data model during query processing, allowing for bi-directional queries by generating an enriched data model that includes both original and inverted associations, enabling efficient query transformation and execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If uni-directional associations are used in the data model, then the data model structure is simple and clear, but bi-directional query capabilities are limited and query results are incomplete

Engineering Contradiction:
Improvedata model structureVSAvoidbi-directional query capability
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent applies inversion by creating virtual inverted associations that reverse the direction of navigation. When a uni-directional association exists from entity A to entity B, the system automatically generates an inverted association from B to A, enabling bi-directional queries without changing the original data model structure. This allows the system to navigate both forward and backward through associations while maintaining the simplicity of the original uni-directional design.

Inventive Principle:
Principle #13The other way round (Inversion)

2Adaptability or versatility

If bi-directional navigation is supported in the data model, then query flexibility is improved, but the data model complexity increases

Engineering Contradiction:
Improvequery flexibilityVSAvoiddata model complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the association navigation capability into two distinct layers: the original uni-directional associations defined in the data model, and virtual inverted associations generated at runtime. This segmentation allows bi-directional navigation to be achieved without increasing the complexity of the core data model, as the inverted associations are created dynamically during query processing rather than being permanently embedded in the model structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system introduces an intermediary layer (the virtual inverted associations) that mediates between the simple uni-directional data model and the requirement for bi-directional queries. This intermediary enables flexible navigation in both directions without requiring the data model itself to become complex, as the inversion logic is handled by the service layer rather than the model definition.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If virtual inverted associations are generated at runtime, then bi-directional query support is enabled without altering the underlying data structure, but additional processing overhead is introduced

Engineering Contradiction:
Improvebi-directional query supportVSAvoidquery processing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The system performs preliminary action by pre-generating and caching the virtual inverted associations when the service is initialized or when the data model is loaded. This allows the inverted associations to be ready for immediate use during query processing, reducing the runtime overhead. The inversion logic is executed in advance rather than being computed on-demand for each query, thereby minimizing the time loss during actual query execution.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11113284B2Virtual backward associations for generic request handling based on models
Publication Date: 2021.09.07 SAP SE
  • US11113284B2 patent drawing
  • US11113284B2 patent drawing
  • US11113284B2 patent drawing

AI summary

Methods, systems, and computer-readable storage media for receiving, in response to instantiation of an application that enables access to data within the database layer through a data model provided as a computer-readable file, the data model defining a set of associations between two or more tables stored in the database layer, processing the data model to provide a set of inverted associations, each inverted association being specific to a respective association in the set of associations, generating an enriched data model including the set of associations of the data model and the set of inverted associations, and hosting a service that uses the enriched data model to enable access to the data within the database layer based on one or more queries submitted from a web client.