XML Table and Path Index Combination for Database Query Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing techniques for accessing XML documents in a database system are inefficient, as they require direct retrieval and processing of entire XML documents for query evaluation, leading to slow performance and unnecessary data retrieval, especially when prior knowledge of the XML schema is lacking or when only a subset of nodes is relevant.
Innovation Solution
The use of a combination of an XML Table Index and an XML Path Index, which allows for efficient selection and navigational access to XML documents without requiring direct access to the entire document, by projecting relevant nodes into columns and using secondary indexes to narrow down the data set, thereby improving query performance without needing prior schema knowledge.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If XML documents are stored in aggregate form in a LOB table, then storage simplicity is improved, but query performance deteriorates due to full document retrieval and processing
Solution Approach 1:
The patent segments XML documents into individual nodes and stores them in a shredded format within database tables. Each XML node is extracted and stored as a separate row with associated metadata, allowing the database to query only relevant nodes rather than retrieving entire documents. This segmentation resolves the contradiction by maintaining storage efficiency while dramatically improving query performance through selective access.
Solution Approach 2:
The patent extracts specific nodes and values from XML documents and stores them separately in database tables with dedicated columns. By taking out only the relevant data elements needed for querying and storing them in an accessible format, the system avoids retrieving entire XML documents while maintaining data integrity and queryability.
2Productivity
If XML documents are shredded into node values and stored in base structures, then query efficiency is improved, but device complexity increases due to schema requirements
Solution Approach 1:
The patent creates a universal shredded table structure that can accommodate multiple XML document types and schemas through a standardized format. The generic table design with flexible columns and metadata fields allows the same storage mechanism to handle diverse XML structures without requiring separate complex schemas for each document type, thus improving query efficiency while managing complexity.
Solution Approach 2:
The patent uses parameter changes by storing XML node information in a standardized format with consistent column definitions (node path, node value, parent ID, etc.). This parameter standardization allows efficient querying across different XML document types while simplifying the overall schema structure, as the same parameters apply universally regardless of the specific XML schema being queried.
3Measurement precision
If direct XQuery search is performed on retrieved XML documents, then query accuracy is improved, but processing time increases due to memory commitment and evaluation overhead
Solution Approach 1:
The patent performs preliminary actions by pre-processing XML documents during the shredding phase, extracting nodes and values into a structured format with metadata. This preliminary organization of data into queryable tables with proper indexing allows the database to execute queries directly on the shredded data without needing to retrieve, commit to memory, and evaluate entire XML documents, thus maintaining query accuracy while reducing processing time.
Data Source
AI summary
A mechanism is provided for accessing XML data in a database system using a combination of a XML Table Index table and a XML Path Index table. By using a combination of a XML Table Index and a XML Path Index, both selection access and navigational access involved in a query can be optimized. For example, the XML Table Index gives the database system an ability to readily evaluate the predicate expression, thereby improving the selection access. Moreover, in some embodiments, the selection access can be further improved by using secondary indexes on columns contained in the XML Table Index table. In a complementary manner, the XML Path Index table gives the database system an ability to navigate to a specific location given a path expression, thereby improving the navigational access. Thus, by combining both tables, both selection and navigational accesses are improved.


