Solved

SQL Server 2008 XML Question

Posted on 2011-03-03
3
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 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