Weblog:   Graying MySQL, and MySQL learns a second language (early conference report )
Subject:   XML support makes sense
Date:   2005-04-20 23:25:04
From:   rpbourret
Storing XML in a single field whose data type is XML makes sense, just as breaking it into relational pieces makes sense. It really depends on the schema of the XML.

Lots of data-centric XML maps easily to relational tables. On the other hand, document-centric XML does not map well to relational tables, nor does some data-centric XML, such as when documents can contain arbitrary XML.

The real question is how the XML data type and XPath processor will be implemented. One assumes that the XML will be heavily indexed and XPath queries executed against those indexes -- parsing the XML documents at run time would be a performance disaster.

For what it's worth, the other major relational databases (DB2, Oracle, Sybase, SQL Server) have all implemented / are implementing similar functionality, although they are supporting XQuery instead of just XPath.

And even thought it would be nice for MySQL to natively transfer data between XML documents and relational tables, there are plenty of middleware products to do this.