XML Query Rewriting for Correlated Field Extraction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing query computation methods for XML data in object-relational database systems are inefficient as they require multiple accesses to the same XML document for each requested value, leading to increased database access costs.
Innovation Solution
The technique involves rewriting database queries to generate a correlated field source, which allows for the retrieval of multiple correlated field values from a single database access, reducing the number of database accesses by identifying common source fragments and applying rewrite criteria to determine when this optimization is beneficial.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If multiple accesses to the same XML document are performed for each requested value, then complete query results can be obtained, but database access costs increase
Solution Approach 1:
The patent merges multiple separate database accesses into a single unified access operation. By identifying that multiple requested values originate from the same XML document (common source fragment), the system combines these separate access operations into one, retrieving all required values in a single database call. This directly addresses the contradiction by maintaining complete query results while eliminating redundant access overhead.
Solution Approach 2:
The system performs preliminary analysis of the query to identify common source fragments before executing the actual data retrieval. By pre-processing the query to detect that multiple values share the same XML document source, the system prepares an optimized access plan that avoids subsequent redundant accesses. This preliminary action resolves the contradiction by ensuring complete results are obtained efficiently.
2Loss of information
If multiple database accesses are performed to retrieve correlated field values, then all required data can be retrieved, but query execution time increases
Solution Approach 1:
The patent combines multiple sequential database access operations into a single parallel access operation. By recognizing that correlated field values are contained within the same XML document, the system merges these separate retrieval operations, obtaining all required values simultaneously in one database call. This eliminates the sequential time penalty while ensuring complete data retrieval.
Solution Approach 2:
The system performs preliminary query analysis to identify common source fragments and correlate field relationships before execution. This pre-processing step detects opportunities to batch multiple value retrievals into single operations, optimizing the execution plan to minimize query execution time while maintaining complete data retrieval.
3Loss of energy
If a single database access is used to retrieve multiple correlated field values, then database access cost is reduced, but query optimization complexity increases
Solution Approach 1:
The patent segments the query optimization process into distinct, manageable phases: (1) parsing the query to identify requested values, (2) analyzing field relationships to detect correlations, (3) identifying common source fragments, and (4) generating optimized access plans. This segmentation reduces optimization complexity by breaking down the complex task into systematic, rule-based steps that can be executed automatically.
Solution Approach 2:
The system creates an abstract representation (copy) of the query structure and field relationships that can be analyzed without executing actual database accesses. By working with this copied model, the optimization process can identify common source fragments and plan merged accesses without the complexity of managing actual data retrieval operations, simplifying the optimization logic.
Data Source
AI summary
Queries that request fields that are contained in the same XML fragments are written to execute them more efficiently.


