Storing Normalized XML Documents in Normalized Relations

This paper studies the XML storage in relations. Unlike traditional techniques, it considers the semantics expressed by functional dependencies. We propose an algorithm for mapping DTD to relational schema, which preserves not only the content and structure but also the semantics of original XML documents. To tackle the problem of constraints expression, we introduce a way to define functional dependencies and normalization for DTD. In a normalized DTD, every constraints expressed by functional dependencies can be concluded to keys. So we use the key definitions for XML as the foundation for relation generation, and maintain the keys in relations. After investigating the relationship between functional dependencies in XML documents with the corresponding ones in relations, we further prove that, if the original DTD is normalized, the generated relations will be in BCNF. So our method keeps the good properties of normalized DTD, and can fully leverage the relational technology