Designing and Implementing Semistructured Storage (Database Engine)

Beginning with SQL Server 2005, SQL Server provides extensive support for XML data processing. XML values can be stored natively in an xml data type column that can be typed according to a collection of XML schemas, or left untyped. You can index the XML column. Additionally, fine-grained data manipulation is supported by using XQuery and XML DML. XML DML is an extension for data modification.

SQL Server 2000 and SQLXML Web releases provide powerful XML data management capabilities. These features focus on mapping between relational and XML data. XML views of relational data can be defined by using annotated XSD (AXSD) to provide an XML-centric approach that supports bulk load of data, query, and update capabilities on XML data. Transact-SQL extensions provide a SQL-centric approach for mapping relational query results to XML by using FOR XML, and for generating relational views from XML by using OPENXML. This support was extended beginning with SQL Server 2005, which also added new native XML support. Therefore, SQL Server now provides a powerful platform for developing rich applications for semi-structured and unstructured data management.

Support for XML is integrated into all the components in SQL Server and includes the following:

  • Support for the xml data type.

  • The ability to specify an XQuery query against XML data stored in columns and variables of the xml type.

  • Enhancements to OPENROWSET to allow bulk loading of XML data.

  • Enhancements to the FOR XML clause and OPENXML function.

In This Section



xml Data Type Representation in the AdventureWorks2008R2 Database

Describes xml type columns in the AdventureWorks2008R2 database. Queries against xml data type in various topics are specified against these columns.

Implementing XML in SQL Server

Describes xml data type, concept of typed versus untyped xml, and various methods of xml data type.

Indexes on XML Data Type Columns

Describes primary and secondary XML indexes on the xml type.

Managing XML Schema Collections on the Server

Describes the concept of the XML schema collection, the DDL to create, modify, or drop the collection, and how to use it in creating typed xml columns and variables.

Using FOR XML and OPENXML to Publish and Process XML Data

Describes the FOR XML clause to use with the SELECT statement to construct XML from relational data and OPENXML, and which you can use to query and shred XML into a rowset.

For information about client-side XML functionality, see SQLXML 4.0 Programming Concepts.

For information about XQuery support in the Microsoft .NET Framework, see the topic "XML Querying and SQL Server XML Support" in the .NET Framework documentation.