Expression Library for Relational Data Result Shaping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for information location and retrieval, particularly in relational databases, face complexities and inefficiencies, including poor performance and error handling, especially when transforming rectangular relational data into arbitrarily structured results.

Innovation Solution

A system and method utilizing an expression library to describe shaping functions, where each element is represented as a method compiled for processing efficiency, with coordinators tracking materialization and enabling two-way visibility, allowing for multiple versions of compiled methods to trade off performance for error handling.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If queries are compiled into procedural methods, then processing efficiency is improved, but complexity of compilation and error handling worsens

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidcomplexity of compilation
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces an expression tree as an intermediary representation between the query and the compiled procedural method. The expression tree captures the query structure in a simplified, intermediate form that is easier to compile and provides better error handling capabilities while maintaining processing efficiency.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the query compilation process into distinct stages: parsing the query into an expression tree, then compiling the expression tree into procedural methods. This segmentation simplifies the overall compilation complexity by breaking it into manageable, independent steps with clear error handling at each stage.

Inventive Principle:
Principle #1Segmentation

2Device complexity

If queries are interpreted live, then compilation complexity is reduced, but processing efficiency worsens

Engineering Contradiction:
Improvecompilation complexityVSAvoidprocessing efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent performs preliminary compilation of the expression tree into procedural methods before actual query execution. This preliminary action captures the query structure and optimization opportunities in advance, enabling efficient processing during runtime while keeping the compilation process itself relatively simple through the use of expression trees.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If expression descriptions are transformed into compiled methods, then processing efficiency is improved, but error handling capability worsens

Engineering Contradiction:
Improveprocessing efficiencyVSAvoiderror handling
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent incorporates feedback mechanisms in the expression tree compilation process that provide detailed error information and contextual information about query structure. This feedback enables graceful error handling while maintaining the processing efficiency benefits of compilation, as the expression tree preserves structural information that aids in diagnostic error reporting.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS8209340B2Efficient functional representation of result shaping
Publication Date: 2012.06.26 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8209340B2 patent drawing
  • US8209340B2 patent drawing
  • US8209340B2 patent drawing

AI summary

A result shaping methodology is part of a bridge (translation layer) between an entity provider and an underlying store provider. The bridge accepts command trees and parameter values from a consumer (e.g., the entity provider), reshapes the trees as necessary for its underlying store provider to execute, executes resulting commands, and assembles the results from the commands into the nested data reader that the initial command tree requested. The result assembly advantageously takes a mapping declaration and compiles it into a set of expression definitions composed from a small number of simple functions. Each collection in the result has a corresponding expression describing how collection elements are realized given relational results. Other expressions describe boundary detection behavior. These expressions are compiled into functions used to shape relational data into arbitrary object graphs or streaming interfaces. Alternative versions of the expressions for performance or graceful contextual error handling are also compiled.