Mid-Tier XML Query Rewriting in Relational Caching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing relational data caching frameworks do not efficiently process queries for XML data stored in XML-enabled relational databases, leading to resource-intensive and computationally expensive materialization of data, which loses the caching benefits and may perform slower than direct database access.

Innovation Solution

A mid-tier data caching framework that processes queries by rewriting XML queries into relational queries, utilizing a relational cache to store and index XML data, allowing for efficient retrieval and processing of XML data without materializing the entire XML document, thus leveraging existing XML indexes and reducing resource usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If XML data is materialized entirely in the relational cache, then query processing can be performed, but memory consumption increases significantly and caching benefits are lost

Engineering Contradiction:
Improvequery processing capabilityVSAvoidmemory consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the necessary portions of XML data from the database and stores them in the relational cache. Instead of materializing entire XML documents, the system retrieves and caches specific XML elements or attributes that are needed for query processing, thereby reducing memory consumption while maintaining query processing capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments XML data into smaller manageable units that can be stored and processed efficiently in the relational cache. By dividing XML documents into constituent elements and attributes, the system can cache only the relevant segments needed for specific queries rather than the entire document, optimizing both memory usage and query performance.

Inventive Principle:
Principle #1Segmentation

2Loss of information

If XML queries are processed directly without rewriting, then query semantics are preserved, but processing efficiency decreases due to lack of utilization of relational cache structures

Engineering Contradiction:
Improvequery semanticsVSAvoidquery processing efficiency
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The patent introduces a query rewriting mechanism that acts as an intermediary between the original XML query and the relational cache. The rewriting process translates XML queries into equivalent relational queries that can efficiently utilize the cached data structures, while the system ensures that the rewritten queries preserve the original query semantics and return correct results.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Speed

If the relational cache stores indexed representations of XML data, then query retrieval speed improves, but the complexity of cache management increases

Engineering Contradiction:
Improvequery retrieval speedVSAvoidcache management complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent applies preliminary indexing to XML data before it is stored in the relational cache. By pre-processing XML data and creating indexed representations during the caching process, the system enables fast query retrieval without requiring complex indexing operations during query execution. This preliminary action simplifies the overall cache management while maintaining high retrieval speeds.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7499909B2Techniques of using a relational caching framework for efficiently handling XML queries in the mid-tier data caching
Publication Date: 2009.03.03 ORACLE INT CORP
  • US7499909B2 patent drawing
  • US7499909B2 patent drawing
  • US7499909B2 patent drawing

AI summary

A method and apparatus for processing queries is provided. A query is received at a mid-tier node of a multi-tier system. The mid-tier node includes a mid-tier cache that is configured to cache relational tables from one or more databases managed by a database server in a database tier of the multi-tier system. At the mid-tier node, a determination is made whether the received query includes an operator for requesting data of an XML datatype from the database server, where the XML datatype is supported as a native datatype by the database server. If a determination is made that the query includes such operator, then one or more portions of one or more relational tables are retrieved from the database server and stored in the mid-tier cache. The one or more relational tables store, in the one or more portions, index information associated with the requested data of the XML datatype. The received query is rewritten into a relational query against at least the one or more portions of the one or more relational tables that are stored in the mid-tier cache.