XML Index Sibling Count Optimization for Single-Path Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Querying and searching information in XML documents stored in object-relational databases is inefficient, particularly for single-path queries, as existing XML indices like b-tree indices cannot determine unique path occurrences, leading to incorrect results and increased disk access.

Innovation Solution

Maintaining a sibling count in the PATH table for each node, allowing for the use of a b-tree index to optimize single-path queries by ensuring only nodes with a sibling count of 1 are considered, thus ensuring correct determination of unique paths and reducing disk access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If a b-tree index is used to optimize value-based searches in XML documents, then disk access is reduced and search speed is improved, but the ability to determine unique path occurrences is lost

Engineering Contradiction:
Improvesearch speedVSAvoidpath occurrence information
Core Design Contradiction:
SpeedVSLoss of information

Solution Approach 1:

The patent segments the index structure into multiple components: the existing PATH table with XPath information, a new SIBLING_COUNT column added to the PATH table, and a secondary index on the SIBLING_COUNT column. This segmentation allows the system to maintain path occurrence information separately while still enabling efficient value-based searches through the secondary index.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary action by pre-calculating and storing the sibling count for each node in the XML document during the index building phase. The SIBLING_COUNT column is populated in advance with the number of siblings for each node, allowing the optimization engine to quickly determine path uniqueness without having to traverse the entire PATH table during query execution.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If a linear search is performed on the PATH table to determine unique path occurrences, then accurate results are obtained, but disk access cost increases significantly

Engineering Contradiction:
Improvequery accuracyVSAvoiddisk access cost
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent performs preliminary action by pre-calculating and storing the sibling count for each node in the XML document during the index building phase. The SIBLING_COUNT column is populated in advance with the number of siblings for each node, allowing the optimization engine to quickly determine path uniqueness without having to traverse the entire PATH table during query execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary element: the SIBLING_COUNT column in the PATH table. This column acts as a mediator between the PATH table data and the query optimization process, providing pre-computed information about path uniqueness that eliminates the need for expensive linear searches while ensuring accurate query results.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If the PATH table is extended to include sibling count information, then single-path queries can be optimized using indices, but the complexity of the index structure increases

Engineering Contradiction:
Improvequery processing efficiencyVSAvoidindex structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies local quality by adding the SIBLING_COUNT column specifically to the PATH table, which is the local structure that stores XML node information. This targeted modification allows the system to optimize single-path queries without fundamentally changing the overall XML indexing architecture. The secondary index on SIBLING_COUNT is created only where needed, rather than restructuring the entire indexing system.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS7840609B2Using sibling-count in XML indexes to optimize single-path queries
Publication Date: 2010.11.23 ORACLE INT CORP
  • US7840609B2 patent drawing
  • US7840609B2 patent drawing
  • US7840609B2 patent drawing

AI summary

A method and apparatus are provided for using sibling-counts in XML indices to optimize single-path queries. Using a b-tree XML index with a SQL query logarithmically reduces the number of disk accesses by passing over index entries where it is determined that a match will not be found. However, because certain index entries are passed over, it is impossible to ascertain if a path expression occurs more than once in the XML index, as certain queries sometimes require. This hurdle can be overcome by maintaining a sibling count with each node entry in the XML index. Because the sibling count is stored with the index entry, the index will reveal whether the matching node is single or has other siblings. In additional to re-writing the original query for optimization by use of an XML index, it will be re-written to check for a single-path condition in the index.