XPath-Based Relational Index Creation for XML Data
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Creating effective indexes and constraints on structured XML data stored in relational databases is challenging due to automatically generated, non-user-friendly table and column names, which hinders performance optimization and requires manual, error-prone DDL command specification.
Innovation Solution
Modify DDL command syntax to allow specification of indexes and constraints using XML syntax, leveraging the XML-to-relational mapping to translate XPath expressions into database constructs, enabling path-based indexing and constraint creation without knowledge of underlying table and column names.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If XML data is stored in relational databases with automatically generated table and column names, then the database can store and manage structured XML data efficiently, but users face difficulty in creating indexes and constraints due to non-user-friendly names
Solution Approach 1:
The patent introduces an intermediary translation layer that converts user-friendly XML path expressions into database-specific table and column names. This mediator component automatically maps XPath expressions like '/catalog/book/title' to the actual generated column names, allowing users to work with intuitive XML syntax while the system handles the complexity of automatically generated database identifiers.
Solution Approach 2:
The patent creates a virtual copy of the XML schema structure that mirrors the automatically generated database tables and columns. This virtual schema layer presents user-friendly names and structures to users, while the actual physical database maintains the automatically generated names for optimization purposes. The system maintains consistency between the virtual and physical schemas through automatic translation.
2Reliability
If users manually specify DDL commands with automatically generated table and column names, then indexes and constraints can be created, but the process becomes error-prone and complex
Solution Approach 1:
The patent implements a self-service mechanism where the database system automatically generates the appropriate DDL commands based on user-friendly XML path specifications. When a user requests an index on an XML path, the system automatically translates this into the correct DDL command with the proper automatically generated table and column names, eliminating the need for users to manually construct complex DDL statements and reducing errors.
Solution Approach 2:
The patent performs preliminary translation of XML path expressions into database constructs before the actual index or constraint creation process. The system pre-computes the mapping between user-friendly XML paths and automatically generated database identifiers, validating the syntax and preparing the translation rules in advance. This preliminary action ensures that when users issue index creation requests, the system already has the translated DDL commands ready, reducing complexity and errors.
Data Source
AI summary
Techniques and approaches are provided for creating indexes and column constraints on structured XML data that is stored in a relational database. Data Definition Language (DDL) Create Index and Create Constraint commands have extended syntax that allows the specification of a path-based expression instead of requiring a column and table name. A mapping created by the system when an XML Schema is registered stores the correspondence of XML data elements to automatically-created database tables and columns that are given names only useful for the internal system. When a user provides a path-based expression in a DDL when creating an index or constraint, the path-based expression is translated to the underlying database constructs using the mapping. Issues are addressed for handling path-based expressions that evaluate to more than one element. Additional index optimization is described using data type information available in the XML schema to select the optimal index type.


