August 29, 2011 at 5:52 am
Hi,
What is the best practice to store XML in a database. Should I store it in the database or should I store it outside the database. When storing the XML in the database, will it get compressed?
Regards,
Nithin
August 29, 2011 at 8:21 am
Look at BOL http://msdn.microsoft.com/en-us/library/ms187339.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 29, 2011 at 2:43 pm
It depends on what you are going to be doing with the XML in the database. Will you be storing it as the XML data type? Will you be querying the XML directly? Will you be updating the XML in the database?
If you do store it in the database, DO use the XML data type, not nvarchar(max) or varchar(max).
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 31, 2011 at 6:30 am
Thanks a loooooooot!!!!!!!! for the valuable suggestions provided.
August 31, 2011 at 8:10 am
I preffear to store in db, a lot of times you need to join data from a lot of xml and that very flexible if there are in db.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply