Mapping XML to a Wide Sparse Table - Bernstein, Phil; Chen, Liang Jeff; Carlin, Peter; , Dimitrije Filipovic; Rys, Michael; Shamgunov, Nikita; Terwilliger, James F.; Todic, Milos; Tomasevic, Sasa; Tomic, Dragan (IEEE Transactions on Knowledge and Data Engineering, 2011)
XML is commonly supported by SQL database systems. However, existing mappings of XML to tables can only deliver satisfactory query performance for limited use cases. In this paper, we propose a novel mapping of XML data into one wide table whose columns are sparsely populated. This mapping provides good performance for document types and queries that are observed in enterprise applications but are not supported efficiently by existing work. XML queries are evaluated by translating them into SQL queries over the wide sparsely-populated table. We show how to translate full XPath 1.0 into SQL. Based on the characteristics of the new mapping, we present rewriting optimizations that dramatically reduce the number of joins. Experiments demonstrate that query evaluation over the new mapping delivers considerable improvements over existing techniques for the target use cases.