上MS的站点看了一下,SQL SERVER本来就支持XML,对大数据的XML也有很好的解决方法。
下面是一种和SCHEEMA映射的方法,还有XPATH的,我就不摘录了。不过MS和ORACLE的方法
好象不太一样,研究研究再说。
(提交失败了两次,害得我敲了三次,发言缩水2/3!!!)
Annotated Mapping Schemas
So let's revisit our Customer XSD schema. The end goal was to generate XML that
validated against the schema. Instead of writing SQL queries to generate the
document, let's try mapping the schema directly to our database structures.
To accomplish this, SQL Server has introduced a number of annotations to the
XSD schema language that specify the XML-to-relational mapping. The basics of
these annotations includes mapping between elements and attributes in the XSD
schema to tables/views and columns in the databases. By default, an element
name in an annotated schema maps to a table (view) name in the specified
database, and the attribute name maps to the column name. These annotations
can also be used to specify the hierarchical relationships in XML (thus,
representing the relationships in the database).