Relational Database Model for XML Data Storage
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Storing XML-documents in relational databases is problematic due to the mismatch in functionality between databases and XML-document files, which complicates data exchange and querying across different systems.
Innovation Solution
A method is introduced where data from XML documents is extracted and stored in a relational database using a fixed database model, with separate tables for elements and attributes, allowing for efficient storage and retrieval of content information while discarding formatting details, enabling simplified database creation and data import/export processes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If XML documents are stored directly in relational databases, then data exchange and interoperability are maintained, but database complexity and query difficulty increase
Solution Approach 1:
The patent segments XML document data into distinct relational database tables: element tables store element data with hierarchical relationships, attribute tables store attribute data linked to elements, and content tables store character data. This segmentation transforms the complex hierarchical XML structure into manageable relational tables, reducing database complexity while preserving data exchange capabilities through standardized element and attribute storage.
2Loss of information
If XML documents are stored directly in relational databases, then complete document information is preserved, but search and query operations become inefficient
Solution Approach 1:
By segmenting XML documents into element tables, attribute tables, and content tables, the patent enables targeted queries on specific data types. Users can query element relationships, attribute values, or content text independently without parsing entire XML documents, significantly improving query efficiency while maintaining complete document information across the normalized tables.
Solution Approach 2:
The patent applies local quality by optimizing different table structures for their specific purposes: element tables use hierarchical ID relationships for structural queries, attribute tables use indexed attribute names for property-based queries, and content tables store text data for full-text search operations. This localized optimization enables efficient query operations on specific data types while preserving complete document information.
3Adaptability or versatility
If a flexible database model is used to accommodate XML variability, then adaptability to different XML structures is improved, but database creation and data import complexity increase
Solution Approach 1:
The patent implements a universal fixed database model where element tables, attribute tables, and content tables can accommodate any XML document structure through standardized fields. The element ID, parent ID, and attribute ID fields provide a universal framework that adapts to different XML hierarchies without requiring custom table designs, simplifying database creation while maintaining adaptability to various XML structures.
4Loss of information
If all XML data including formatting information is stored, then complete document representation is achieved, but memory usage increases
Solution Approach 1:
The patent extracts only the essential content information from XML documents—element data, attribute data, and character data—while excluding formatting information such as indentation, whitespace, and presentation markup. This extraction reduces memory usage by storing only semantically meaningful data in the relational database, while complete document representation is maintained through the structured storage of content elements.
Data Source
AI summary
A method for importing data from an XML document containing a plurality of elements and a plurality of attributes into a relational database includes: creating an element table for storing data of the plurality of elements and creating an attribute table for storing data of the plurality of attributes. In the element table, element records, each containing a unique element ID, are stored, one record for every one of the plurality of elements is stored. In the attribute table, an attribute record for every one of the plurality of attributes is stored. Each attribute record includes an attribute name, an attribute value and the element ID of the element to which the attribute is assigned. The method provides a fixed database model for different XML documents; allows a simple creation of a database; and allows simple data import and export into/from the database.


