Function-Based Object Queries for JSON Data
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional database techniques for accessing or updating structured or semi-structured data, such as JSON objects, are often complex and inadequate, as they may not account for the internal structure of the data, leading to issues with operation ordering and side effects during processing.
Innovation Solution
A function-based query approach is employed, where requests to modify JSON objects are processed as a tree of functions evaluated in a bottom-up fashion, avoiding side effects on the target object until the top-level function is fully evaluated, and treating parameters as immutable to enable parallel processing and optimize data loading.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conventional database techniques are used to access or update structured or semi-structured data, then the data can be stored in a single field, but the techniques become complex and inadequate for handling the internal structure of the data
Solution Approach 1:
The patent segments structured data into hierarchical components (root object, sub-objects, fields) that can be independently accessed and manipulated. This allows the database to handle complex nested structures by breaking them down into manageable units that can be processed separately while maintaining their relationships.
Solution Approach 2:
The patent introduces an intermediary layer (the database management system with awareness of data structure) that mediates between the stored data and access operations. This intermediary understands the hierarchical structure and provides simplified access methods, avoiding the need for complex external processing techniques.
2Productivity
If conventional techniques are used to update structured data, then updates can be performed, but operation ordering and side effects become problematic
Solution Approach 1:
The patent evaluates the entire tree of functions in a bottom-up fashion before executing any updates. This preliminary evaluation phase determines the complete set of operations and their ordering, ensuring that all side effects are accounted for before any actual data modification occurs, thus maintaining reliability.
Solution Approach 2:
The patent extracts the evaluation phase from the execution phase. By separating the function evaluation (which determines operation ordering and side effects) from the actual update execution, the system can analyze and plan all operations beforehand, ensuring correct ordering and minimizing problematic side effects during the actual update process.
3Ease of operation
If parameters are treated as mutable during query processing, then flexibility is maintained, but parallel processing becomes difficult and efficiency decreases
Solution Approach 1:
The patent creates immutable copies of parameters during the evaluation phase. Each parameter is treated as a constant value that can be freely shared across multiple processing threads without concern for modification. This copying approach enables efficient parallel processing while maintaining the flexibility needed for query operations.
Solution Approach 2:
The patent performs preliminary evaluation of all functions and determines parameter values before the actual update execution. By resolving all parameter dependencies in advance and treating them as immutable constants during execution, the system enables parallel processing of independent operations while maintaining operational flexibility through the preliminary planning phase.
Data Source
AI summary
A repository of key-value data may store a first object value having an internal structure of a hierarchy of sub-objects. The repository may receive a request to modify the first object, expressed as a function, without side effects, of one or more parameters. Values may be assigned to the one or more parameters by mapping from the parameters to locations in the hierarchy of sub-objects. A second object may be formed based on the return value of the function. The first object may be replaced in the repository by the second object.


