Exporting Relational Data into a Native XML Store Jaroslav Pokorny and Jakub Reschke Department of Software Engineering, Faculty of Mathematics and Physics, Charles University, 118 00 Praha, Czech Republic, pokorny@ksi.ms.mff.cuni.cz Introduction XML, see Bray et al. (2004), has thoroughly established itself as the stan- dard format for data interchange between heterogeneous systems. Its sig- nificant role is also in the vision of so-called Semantic web specified in W3C (2001) where it contributes to low-level representation of informa- tion. As most of the enterprise’s data is stored in relational database sys- tems, conversion problems of relational data into XML should be studied in details. The publishing scenario can be twofold: relational data has to be visible as XML data independently from how the data is stored or, and it is more important today, relational data has to reside in a native XML store. The former scenario is simple because the resulting structure mirrors the original relational tables’ flat structure. The latter requires more advanced techniques, for example preserving at least a part of integrity constraints applied in the original relational database or ensuring non-redundant stor- ing the database as XML data. Generally, it means to convert relational da- tabase schemes into schemes expressed in XML Schema language (Fall- side and Walmsley 2004). Commercial RDBMS partially support these facilities mainly through the XML features of the standard SQL:2003, see ISO (2003), particularly its part SQL/XML (XML-Related Specifications) given in ISO (2004). SQL/XML (hereinafter called “the standard”) has been embraced by most major relational database vendors. Anyhow, there are many previously re- leased proprietal solutions in their RDBMSs as well. The standard treats not only XML publishing functions, but also map- ping rules for transformations from the extended relational data model (RDM) to XML Schema. By “extended” we mean mainly a possibility to nest relations, which distinguishes the model from the original flat rela- tions. According to usual terminology we call a description of XML data expressed in XML Schema as XSD (XML Schema Definition). This paper offers an algorithm doing this task and respecting recommendations of the