Modern RDBMS\'s have support for XML column types and functionality for dealing with XML in stored procedures. Historically I would always have mapped hierarchical data (whe
Here is a real world example from a system I work on. We have a core system and create customer-specific code in java. A different class may be called depending on which customer is transacting. Sometimes this custom code needs to store something and we put it into an XML column in the relevant table. This saves us from modeling everything under the sun. Adding a new customer generally just means writing and installing the java code.
The downside is that reporting, querying and updates are more difficult on the XML column. There are none of the usual good database features like check constraints, etc.