Xml2rel: an efficient system for storing and querying xml documents using relational databases
暂无分享,去创建一个
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. The main challenge of this approach is that, one needs to resolve the conflict between the hierarchical nature of the XML data model and the flat nature of the relational data model.
We propose and develop an efficient mapping system, called XML2REL , for storing and querying XML documents using relational databases in the presence of an XML schema (DTD) through three main mappings: (i) XML2REL requires the translation of an XML DTD to a relational schema. While existing work in the literature for this task is lossy and incomplete, we propose a lossless and complete algorithm to overcome the shortcomings of existing algorithms. (ii) XML2REL requires the XML data to be shredded and composed into relational tuples based on the schema mapping. We propose the first linear algorithm for schema-based XML-to-Relational data shredding in the literature. (iii) XML2REL requires the XML queries given against the original XML documents to be translated to their SQL equivalents. The XML-to-SQL query mapping algorithms in the literature are not generic enough to deal with multiple-valued mappings besides single-valued mappings. We propose the first generic query mapping algorithms to deal with both single-valued and multiple-valued mappings.
In particular, we propose the following components as the main parts of the mapping system XML2REL: (1) Consistency Checking, which checks whether a DTD is consistent or not. (2) Schema Mapping, which takes a DTD as an input and maps it to a relational schema. (3) Data Mapping, which shreds XML data conforming to a DTD into tuples and inserts them to a relational database based on the underlying schema mapping information. (4) Query Mapping, which translates an XML query to a SQL query to be run against the XML data stored in a relational database. (5) Reconstruction, which reconstructs an XML subtree rooted at a node from the relational database.