Solved

SQL Server 2008 XML Question

Posted on 2011-03-03
3
226 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Check ALL SP in database make sure there are no errors 17 71
SQL Server 2008 R2, need a pivot/cross tab query... 4 78
Disable TLS1.0 on Win 2012 server 7 117
t-sql left join 2 34
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
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…

751 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