Unified Data Query Across Heterogeneous Databases
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data query technologies face difficulties in seamlessly querying data across different databases, such as RDS and KV types, due to differences in storage engines and structures, which complicates the process and limits the completeness of data queries, especially when importing/exporting data into Hadoop systems like Polybase technology.
Innovation Solution
A method and apparatus that convert a query request based on a business model into an execution mode matching the queried databases using a conversion rule between the business model and storage model, masking low-level database differences and avoiding data import/export, allowing for unified querying across various databases.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If data is imported/exported into Hadoop systems like Polybase technology to query different databases, then query capability across databases is achieved, but considerable workload is required and data query completeness is affected
Solution Approach 1:
The patent introduces a conversion unit as an intermediary component that converts query requests from a first model into execution modes matching different database storage models. This mediator layer enables unified querying across RDS and KV databases without requiring data import/export operations, thereby maintaining query versatility while eliminating the considerable workload associated with traditional data migration approaches
Solution Approach 2:
The patent creates a universal query processing system that can handle multiple database types (RDS, KV, Hadoop) through a single conversion framework. The conversion unit applies conversion rules that map query requests to appropriate execution modes for different storage engines, making the system multi-functional and applicable to various database systems without requiring separate query processing logic for each database type
2Adaptability or versatility
If Polybase technology is used to query Hadoop data and relational databases, then associated query function is realized, but the technology is not applicable to each storage engine (e.g., Tair, OceanBase)
Solution Approach 1:
The patent employs parameter changes by dynamically adjusting conversion rules based on the target database's storage model. The conversion unit modifies query parameters and execution modes according to the specific storage engine characteristics (RDS, KV, Hadoop, Tair, OceanBase), enabling the system to adapt to different storage engines without requiring complex specialized handling for each type
Solution Approach 2:
The conversion unit serves as an intermediary that abstracts the complexity of different storage engines from the query processing layer. By translating unified query requests into storage-engine-specific execution modes through this mediator, the system achieves broad storage engine compatibility without exposing the complexity of individual engine implementations to the user or requiring complex conditional logic
3Reliability
If different databases require different implementations for the same query, then database-specific optimization is achieved, but query implementation complexity increases
Solution Approach 1:
The patent segments the query processing into distinct phases: query request reception, conversion to execution mode, and database access. The conversion unit separately handles the translation logic for different database types, while the database access unit executes the optimized queries. This segmentation allows database-specific optimizations to be implemented independently without increasing overall query implementation complexity
Solution Approach 2:
The conversion unit acts as an intermediary that handles the complexity of database-specific implementations. It translates unified query requests into optimized execution modes tailored to each database type, thereby maintaining database-specific optimization benefits while shielding the query processing system from implementation complexity. The mediator absorbs the variability in database-specific logic, presenting a consistent interface to the access layer
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method and an apparatus of querying data are provided. The data is stored in at least two different databases. The method includes: receiving a query request based on a business model, the business model including business elements; converting the query request into an execution mode that matches with databases to be queried according to a conversion rule between the business model and a storage model, the storage model including attribute information of the queried databases and the conversion rule including a corresponding relationship between the business elements and attributes in the queried databases; and accessing a corresponding database according to the execution mode. The technical solutions of the present disclosure prevent the data from being imported and exported between different databases and have no limitations on applicable databases. Furthermore, a difference between low-level databases is masked at a user level and the convenience and completeness of querying is improved.