XML Database Query Optimization via Prime Number Synopsis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing XML database querying systems face inefficiencies in processing large datasets due to inadequate selectivity estimation and storage requirements, particularly when handling complex query tree patterns with logical operators and wildcards, leading to suboptimal query execution plans and increased response times.

Innovation Solution

The XQuest system employs a synopsis generator that uses prime labeling and structural merging to create a compact summary of XML documents, combined with a selectivity estimator that calculates accurate selectivity estimates for various query tree patterns, enabling the selection of the optimal query execution plan based on these estimates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If traditional XML database querying systems process large datasets, then query completeness is maintained, but processing speed decreases and response time increases

Engineering Contradiction:
Improvequery processing speedVSAvoidstorage requirements
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent creates a compressed synopsis (copy) of the XML database that captures essential structural and statistical information. This synopsis serves as a lightweight representation that enables fast selectivity estimation without requiring storage of the complete XML dataset, thus improving query processing speed while reducing storage requirements.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The system transforms the XML database into a synopsis with different parameters - storing aggregated statistics, path frequencies, and structural metadata instead of raw XML data. This parameter transformation allows the system to estimate query selectivity efficiently while maintaining the ability to answer complex queries about the original large dataset.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If selectivity estimation accuracy is improved for complex query tree patterns, then optimal query execution plan selection is enabled, but system complexity increases

Engineering Contradiction:
Improveselectivity estimation accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system performs preliminary analysis during synopsis generation, pre-computing path frequencies, node statistics, and structural properties of the XML database. When a complex query arrives, these pre-computed values enable accurate selectivity estimation through simple lookups and calculations, avoiding the need for complex real-time analysis and reducing system operational complexity.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The synopsis acts as an intermediary structure between the raw XML database and the query execution engine. It mediates complex selectivity estimation by providing pre-aggregated statistics and structural information that simplify the calculation process, enabling accurate estimates for complex query tree patterns without requiring the query engine to directly analyze the entire XML dataset.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Loss of time

If query execution plan optimization is implemented, then query response time is reduced, but computational overhead increases

Engineering Contradiction:
Improvequery response timeVSAvoidcomputational overhead
Core Design Contradiction:
Loss of timeVSUse of energy by moving object

Solution Approach 1:

The system uses the synopsis to perform partial selectivity estimation - calculating estimates for only the most critical parts of query execution plan evaluation. This partial action approach provides sufficient information for optimizer decisions without performing exhaustive computational analysis, thus reducing response time while limiting computational overhead to acceptable levels.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11416547B2Method and system for querying an XML database
Publication Date: 2022.08.16 KING FAHD UNIVERSITY OF PETROLEUM AND MINERALS
  • US11416547B2 patent drawing
  • US11416547B2 patent drawing
  • US11416547B2 patent drawing

AI summary

A method is provided for selecting a query execution plan, including: receiving an XML document including a plurality of root nodes and a plurality of leaf nodes; determining root-to-leaf paths based on the plurality of root nodes and the plurality of leaf nodes; generating a prime number for each unique root-to-leaf path; calculating a number of instances in which each prime number appears; generating an XML synopsis based on the prime numbers and the number of instances; determining a comparison between a query tree pattern and the XML synopsis; determining a type of the query tree pattern; calculating for each query tree pattern plan, a selectivity estimate based on the comparison and the type of the query tree pattern; determining an optimal query execution plan based on the selectivity estimate; and selecting the optimal query execution plan for performing a query of the XML document based on the determination.