Difficulty storing XML data in SQL Server 2005
Expert Adam Machanic discusses the ramifications of storing XML data in SQL Server 2005 using the new XML data type.
Much like CLR user-defined types (UDTs) XML is now a new first-class data type in SQL Server 2005. Developers may...
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.

now be tempted to use this data type to avoid having to write code to "shred" XML data into tables (i.e. instead of using OPENXML to populate tables with the data).
Unfortunately, using the XML data type like this has many of the same problems as representing data in user-defined types. Developers should keep performance in mind, as querying a node of an XML column will require the engine to evaluate a separate XML query for each row of the table. Normalization issues are also present, similar to using CLR UDTs. Ensuring data integrity will be extremely difficult in databases that make too much use of the XML data type.
Do you have comments on this Ask the Expert Q&A? Let us know.
Dig Deeper on Microsoft SQL Server 2005
PRO+
Content
Find more PRO+ content and other member only offers, here.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our SQL Server experts
View all SQL Server questions and answers
0 comments
Oldest Newest