Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Server 2008 XML Question

Posted on 2011-03-03
3
Medium Priority
?
235 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 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

670 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