XML Update Query Rewriting for Database Performance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current database systems face inefficiencies in updating XML data stored in object-relational databases due to the overhead of copying and replacing entire XML documents, which affects performance during updates.
Innovation Solution
The approach involves rewriting XML updating queries into optimized path-based query operators that allow direct updates to XML data in database storage, avoiding the need for materializing the entire XML document and using storage format-specific operators for efficient execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If XML data is updated using conventional copy-and-replace methods, then XML data can be modified, but database performance deteriorates due to copying and replacing entire XML documents
Solution Approach 1:
The patent segments the XML document into a hierarchical structure where only specific portions need to be updated. Instead of copying the entire document, the system identifies and updates only the affected nodes and their descendants, significantly reducing the amount of data that needs to be copied and replaced in the database.
Solution Approach 2:
The patent extracts only the necessary portions of the XML document for updating. By using XPath expressions to locate target nodes and their descendants, the system extracts only those specific segments that need modification, leaving the rest of the document unchanged in the database storage.
2Ease of operation
If entire XML documents are materialized for updating, then updates can be performed, but query execution time increases due to processing overhead
Solution Approach 1:
The patent performs preliminary actions by pre-compiling XPath expressions and pre-resolving node identifiers before the actual update operation. This allows the database to quickly identify target nodes and their descendants without having to materialize the entire XML document during query execution.
Solution Approach 2:
The patent introduces dynamic node identification using XPath expressions that can adapt to different XML structures. Instead of static pre-defined update patterns, the system dynamically resolves XPath expressions to identify target nodes and their descendants, allowing flexible updates without full document materialization.
3Adaptability or versatility
If conventional XML update methods are used, then XML data can be modified, but storage space is consumed by duplicate XML document copies
Solution Approach 1:
The patent segments the XML document into a hierarchical structure where only specific portions need to be updated. Instead of copying the entire document, the system identifies and updates only the affected nodes and their descendants, significantly reducing the amount of data that needs to be copied and replaced in the database.
Data Source
AI summary
The approaches described herein provide an efficient way to process certain kinds of queries that update XML data stored in an object-relational database. A query may include an XML query expression that conforms to a language for querying XML documents. A technique first determines whether the query contains an XML updating expression, and in response rewrites the query to comprise one or more path-based query operators that specify operations for updating XML data. The query may then be further rewritten to comprise one or more storage format specific query operators based on the particular database storage format associated with the XML data specified in the query. The rewritten query operators are used to generate a query execution plan that provides for several query execution optimizations.


