Is storing XML with a standard structure in SQL Server a bad use of the XML datatype? -


we have table in our database stores xml in 1 of columns. xml in exact same format out of set of 3 different xml formats received via web service responses. need information in table (and inside of xml field) frequently. poor use of xml datatype?

my suggestion create seperate tables each different xml structure talking 3 growth rate of maybe 1 new table year.

i suppose matter of preference, here reasons prefer not store data in xml field:

  1. writing queries against xml in tsql slow. might not bad small amount of data, you'll notice decent amount of data.

  2. sometimes there special logic needed work xml blob. if store xml directly in sql, find duplicating logic over. i've seen before @ job guy wrote xml field long gone , left wondering how work it. elements there, not, etc.

  3. similar (2), in opinion breaks purity of database. in same way lot of people advise against storing html in field, advise against storing raw xml.

but despite these 3 points ... can work , tsql supports queries against it.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -