Abstract Syntax Tree to Nested Map Query Encoding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Interchange formats like JSON, used for communicating database queries, have limited data type support and structural complexity, making it difficult to encode database queries without losing fidelity when transmitted between client applications and database services.
Innovation Solution
The use of an abstract syntax tree is employed to formulate a map-based representation of database queries, which are then encoded into a hierarchy of nested maps within the interchange format, allowing for the transmission and execution of queries across type-limited interchange formats.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If interchange formats like JSON are used to communicate database queries, then the format is compact and easily parsed, but the format has limited data type support and cannot readily adapt to database applications
Solution Approach 1:
The patent introduces an intermediary translation layer that converts database query syntax into interchange format representations. This mediator component translates SQL-like query statements into JSON-compatible structures, enabling database queries to be transmitted through the limited interchange format without losing essential query functionality or data type information.
2Device complexity
If the interchange format is designed for wide range applications, then it is compact and easily parsed, but it does not have extensive type support for specialized fields
Solution Approach 1:
The patent employs nested structures within the interchange format to represent complex database query elements. Query components such as filters, projections, and data type specifications are nested within the JSON structure, allowing the format to maintain its simple external appearance while encoding sophisticated query semantics and data type information internally through hierarchical nesting.
Data Source
AI summary
A client application may interact with a database service using a data interchange format with limited support for database data types or query representations. A map may be supported in the interchange format as a collection of name-value pairs. A database query may be parsed to form an abstract syntax tree. From the abstract syntax tree, a hierarchy of nested maps may be formed to represent the query, based on schemas mapping from regions of the abstract syntax tree to maps in the interchange format.


