SQL Server 2008 XML Question

Hi,

I am currently using a linked table (primary key and foreign key) to hold metadata about my product inventory. The metadata gets a little unwieldy and I am able to have it logically relate to the product it is based on. I am thinking of using an xml fragment to represent the metadata for each product.

1) I would like to know if I should store the metadata in the same table, and will it slow down query processing if I do keep it in the same table.
2) Can you point me to an example of code to update an xml column without having to rewrite the contents?

Example

<metadata>
  <color>green</color>
  <color>blue</color>
</metadata>

What would I need to do to add the color red to this fragment?

Thanks In Advance!!!
dilithiumtoys_dot_comAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
>>  that does answer a part of my question

I understand. That's the only part I knew the answer to   = )
0
 
käµfm³d 👽Commented:
>>  2) Can you point me to an example of code to update an xml column without having to rewrite the contents?

http://msdn.microsoft.com/en-us/library/ms345122(v=sql.90).aspx

There is an example toward the bottom of the page under "Example: Inserting a skill."
0
 
dilithiumtoys_dot_comAuthor Commented:
Thanks Kaufmed, that does answer a part of my question
0
All Courses

From novice to tech pro — start learning today.