Solved

SQL Server 2008 XML Question

Posted on 2011-03-03
3
224 Views
Last Modified: 2012-06-27
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!!!
0
Comment
Question by:dilithiumtoys_dot_com
  • 2
3 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 35029425
>>  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
 

Author Comment

by:dilithiumtoys_dot_com
ID: 35031999
Thanks Kaufmed, that does answer a part of my question
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 35035556
>>  that does answer a part of my question

I understand. That's the only part I knew the answer to   = )
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question