Polymorphic Query Processing via TYPEOF Expressions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional query languages lack mechanisms to efficiently handle very large queries, leading to system bottlenecks and interrupting smooth execution of other queries, especially in large databases used by growing organizations.

Innovation Solution

The introduction of polymorphic relationships through the TYPEOF expression in the SOQL SELECT clause allows for efficient data selection based on the type of parent object, reducing latency and enabling batch processing techniques to handle large queries effectively.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional query languages are used to handle very large queries, then the system can process data from huge databases, but the system becomes bottlenecked and execution of other queries is interrupted

Engineering Contradiction:
Improvequery processing throughputVSAvoidsystem bottleneck duration
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments large queries into smaller batches using batch processing techniques. The query processor divides complex queries involving huge databases into multiple manageable batches, processes them sequentially or in parallel, and aggregates results. This prevents system bottlenecks by avoiding overload from monolithic query execution while maintaining high throughput through efficient batch management.

Inventive Principle:
Principle #1Segmentation

2Reliability

If traditional query languages process very large queries, then complete data retrieval is achieved, but computation time increases and system resources are consumed

Engineering Contradiction:
Improvedata retrieval completenessVSAvoidcomputation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts and applies polymorphic relationships through TYPEOF expressions to selectively filter and process data based on parent object types. Instead of retrieving all data and filtering client-side, the system extracts only relevant fields based on type conditions in the query itself, reducing computation time while maintaining complete and accurate data retrieval through type-specific field selection.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary data filtering and type checking through TYPEOF expressions in the query definition stage. By pre-specifying type conditions and relevant fields before execution, the system prepares optimized query plans that reduce computation time during actual data retrieval while ensuring complete and accurate results through pre-validating type constraints.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If polymorphic relationships with TYPEOF expressions are implemented, then query efficiency is enhanced and computation time is reduced, but query language complexity increases

Engineering Contradiction:
Improvequery efficiencyVSAvoidquery language structure
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces dynamic type checking and field selection through TYPEOF expressions that evaluate parent object types at query execution time. This dynamic approach allows the query language to adapt to different data types and structures within polymorphic relationships, enhancing query efficiency through type-specific optimization while managing complexity through a unified expression syntax that works across multiple object types.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11036731B2Systems, methods and techniques for polymorphic queries
Publication Date: 2021.06.15 SALESFORCE INC
  • US11036731B2 patent drawing
  • US11036731B2 patent drawing
  • US11036731B2 patent drawing

AI summary

Techniques for providing polymorphic query requests. A request is received that has at least a database query. The database query comprises at least an expression using a polymorphic relationship. The request is processed utilizing the polymorphic relationship. A user-readable result is provided for the query where the result is defined by at least the polymorphic relationship.