Chapter 7. XML Data

SQL Server 2005 provides extensive support for XML data storage and processing. You can store XML documents and fragments natively as columns and T-SQL variables of the new xml data type. xml data type columns can be indexed, typed according to an XML schema, and manipulated using XQuery and XML Data Manipulation Language (DML).

A relational model is particularly suited to data that is highly structured with a well-known, well-defined schema. XML data, on the other hand, is suitable to handling data with a flexible, evolving, or unknown structure. XML is also well suited to storing data that represents a containment hierarchy.

Some reasons to store data as XML include the following:

  • Using the administrative capabilities of SQL Server to manage your XML data

  • Efficiently sharing, querying, and making fine-grained modifications to your XML data

  • Ensuring that data is validated against an existing XML schema

In addition to natively storing XML data, SQL Server 2005 lets you map relational data to XML data using XQuery extension functions and map XML data to relational data using the FOR XML clause.

SQL Server 2005 includes SQLXML 4.0. This extends and enhances the client-side XML functionality introduced in SQLXML 3.0, which shipped as a web release after the release of SQL Server 2000.

Programming SQL Server 2005
Programming SQL Server 2005
ISBN: 0596004796
EAN: 2147483647
Year: 2007
Pages: 147
Authors: Bill Hamilton © 2008-2017.
If you may any questions please contact us: