SQL Association Propagation for Query Redundancy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Standard SQL does not capture relationships between different data models, requiring repeated definitions of JOIN clauses in SQL statements to combine data from multiple database tables, which can be inefficient and error-prone.

Innovation Solution

The introduction of SQL associations, which are forward-declared JOINs that capture relationships between data models, allowing these associations to be defined once and propagated to SQL views, eliminating the need for repeated JOIN clause definitions in subsequent queries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If JOIN clauses are repeatedly defined in SQL statements to combine data from multiple database tables, then data combination functionality is achieved, but statement complexity and redundancy increase

Engineering Contradiction:
ImproveEase of creating SQL queriesVSAvoidSQL statement complexity
Core Design Contradiction:
Ease of manufactureVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by pre-defining JOIN associations between data models in a preliminary registration phase. These associations are stored in the database system and automatically propagated to SQL views, eliminating the need to repeatedly define JOIN clauses in subsequent queries. The system performs the JOIN configuration work in advance, before actual query execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating SQL associations that represent JOIN relationships as reusable templates. Instead of copying and pasting JOIN clauses manually in each SQL statement, the system automatically copies and applies the pre-defined association definitions to multiple SQL views and queries, reducing redundancy and ensuring consistency.

Inventive Principle:
Principle #26Copying

2Reliability

If JOIN clauses are manually defined in each SQL statement, then data combination from multiple tables is achieved, but time consumption and error probability increase

Engineering Contradiction:
ImproveQuery accuracyVSAvoidQuery development time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements self-service by enabling the database system to automatically propagate SQL associations to views and execute queries using pre-defined JOIN relationships. The system serves itself by maintaining and applying association metadata without requiring manual intervention in each query, thereby reducing errors and saving time.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system uses feedback mechanisms to automatically detect and propagate SQL associations from data model definitions to SQL views. When a data model is created or modified, the system provides feedback about the associated JOIN relationships and automatically updates relevant views, ensuring consistency and reducing manual effort.

Inventive Principle:
Principle #23Feedback

3Productivity

If SQL associations are propagated to SQL views, then redundancy of JOIN clause definitions is reduced, but processing overhead for association management is introduced

Engineering Contradiction:
ImproveQuery execution efficiencyVSAvoidAssociation propagation mechanism
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies segmentation by separating the JOIN logic into distinct SQL association definitions that are independent of specific queries. The association management functionality is segmented into separate components: association registration, propagation logic, and query execution. This modular approach manages complexity while improving productivity.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10558658B2Propagation of structured query language associations
Publication Date: 2020.02.11 ANYCASTING
  • US10558658B2 patent drawing
  • US10558658B2 patent drawing
  • US10558658B2 patent drawing

AI summary

A method for propagating a structure query language (SQL) association can include determining, based at least on a syntax of a SQL create view statement, that a SQL association requires propagation to a SQL view associated with the SQL create view statement. The SQL association can combine data from at least a first data model and a second data model at a database. The SQL view can comprise at least a portion of the combined data. An association information data structure can be generated for storing information corresponding to a definition of the SQL association. The SQL create view statement can be executed based on the association information data structure. Related systems and articles of manufacture, including computer program products, are also disclose.