Skip to main content
QUICK REVIEW

[Paper Review] Mapping XML Data to Relational Data: A DOM-Based Approach

Mustafa Atay, Yezhou Sun|arXiv (Cornell University)|Oct 8, 2010
Advanced Database Systems and QueriesComputer Science12 references13 citations
TL;DR

This paper proposes XInsert, a linear-time algorithm for mapping XML data to relational databases using a DOM-based approach. It efficiently translates XML INSERT statements into sequences of SQL INSERT statements by traversing the DOM tree and applying inlining-based schema mappings, achieving O(n) time complexity for n XML elements and attributes.

ABSTRACT

XML has emerged as the standard for representing and exchanging data on the World Wide Web. It is critical to have efficient mechanisms to store and query XML data to exploit the full power of this new technology. Several researchers have proposed to use relational databases to store and query XML data. While several algorithms of schema mapping and query mapping have been proposed, the problem of mapping XML data to relational data, i.e., mapping an XML INSERT statement to a sequence of SQL INSERT statements, has not been addressed thoroughly in the literature. In this paper, we propose an efficient linear algorithm for mapping XML data to relational data. This algorithm is based on our previous proposed inlining algorithm for mapping DTDs to relational schemas and can be easily adapted to other inlining algorithms.

Motivation & Objective

  • Address the underexplored problem of XML-to-relational data mapping, particularly translating XML INSERT statements into SQL INSERT statements.
  • Develop an efficient algorithm that works in conjunction with existing schema mapping techniques, especially inlining-based approaches.
  • Ensure the data mapping process is scalable and performs well on large XML documents by leveraging DOM tree traversal.
  • Provide a foundation adaptable to various inlining-based schema mapping algorithms beyond the authors' own DTDMap.

Proposed method

  • Utilize the Document Object Model (DOM) to represent XML documents as in-memory trees for systematic traversal.
  • Apply a two-phase algorithm: first, identify non-inlinable elements and process them; second, handle inlinable elements through recursive traversal.
  • Enqueue each XML element into a relational table only once, ensuring no duplication and maintaining referential integrity during insertion.
  • Leverage the inlining technique from prior schema mapping (e.g., DTDMap) to reduce the number of tables and minimize join operations.
  • Use a while loop to process non-inlinable elements and another while loop to process inlinable elements, both operating in linear time.
  • Ensure each DOM node is visited exactly once, guaranteeing O(n) time complexity where n is the total number of XML elements and attributes.

Experimental results

Research questions

  • RQ1How can XML data be efficiently mapped to relational databases using a DOM-based approach?
  • RQ2What is the time complexity of a data mapping algorithm that processes XML documents via DOM traversal and inlining?
  • RQ3How does the performance of the proposed algorithm scale with increasing XML document size?
  • RQ4How does the algorithm perform on XML documents with different structural characteristics (e.g., document-centric vs. data-centric)?

Key findings

  • The XInsert algorithm achieves O(n) time complexity, where n is the number of XML elements and attributes, making it linear and highly efficient.
  • The algorithm performs well on both data-centric (catalog.dtd) and document-centric (auction.dtd) XML documents, with consistent linear scaling.
  • Performance degradation begins at 40 MB document size due to memory constraints, as DOM trees exceed main memory and require disk swapping.
  • The auction.dtd document, which contains deeply nested, recursive textual elements, takes longer to process than catalog.dtd, especially at 50 MB, due to increased tree depth.
  • The algorithm's performance is stable and predictable across different schema mapping schemes, including DTDMap and shared-inlining.
  • The algorithm is easily adaptable to other inlining-based schema mapping techniques, enhancing its reusability and extensibility.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.