Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Some Usages for XML Expand / Collapse
Author
Message
Posted Friday, January 19, 2007 10:30 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, September 11, 2014 10:05 AM
Points: 553, Visits: 22
Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/yEkhtiari/2822.asp


Post #338285
Posted Thursday, February 22, 2007 8:18 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, June 27, 2014 10:36 AM
Points: 15, Visits: 60

I work since a few months with XML and I found very useful this article because I didn´t know all the advantages mencioned in the article.

Thanks and sorry for my english (I'm from Argentina).

Post #346705
Posted Thursday, February 22, 2007 8:27 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, August 9, 2007 10:18 PM
Points: 6, Visits: 1
This was a very useful article. What is the size limit to the VARCHAR(max) declaration?
Post #346710
Posted Thursday, February 22, 2007 10:17 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, September 6, 2014 6:18 PM
Points: 304, Visits: 521

Nice.  the difference in time is more pronounced at 40k rows than 20k, although if you keep going up the time to create the delimited string becomes too unbearable to test.

Question: assuming that the delimited string is coming from the outside (so you don't have to worry about the time to create it), will there be a point at which the performance of the REPLACE() function becomes unbearable also?

Small thing: You probably need to change your name for the XML proc in the code sample and also your test code, which does this:

print     @CSV
exec usp_LoopVersion       @CSV
exec usp_LoopVersion   @CSV

Thanks,

>L<

 

Post #346759
Posted Thursday, February 22, 2007 12:40 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, October 21, 2010 6:46 AM
Points: 25, Visits: 5

XML is a good solution for some sticky problems.

For example, I'm programming an application that stores information for physical exams that a medical practice performs. The problem is that the exam is rather dynamic, in that it frequently changes (doctors are a contentious breed), and updating the database was becoming a real challenge because of the necessity of keeping old data and new data in the same tables.

The solution was to store the raw exam data in an XML field, but keep basic patient information (ExamID, DateOfService, ExamType, etc) in regular SQL Server fields. That way I could retrieve the XML field, then query and update it using XML classes directly from my windows application. The good news is that if the XML node isn't present, the XML query simply ignores that part of the query without breaking the code. In other words, the structure of the exam can change without blowing up the application or requiring major changes in my existing functions in the data layer. Really nice.

Lee...

Post #346795
Posted Thursday, February 22, 2007 3:29 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410
2,147,483,647 bytes, basically 2 Gigabytes


/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
Post #346843
Posted Friday, February 23, 2007 10:35 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Saturday, May 24, 2014 7:58 PM
Points: 219, Visits: 824

SQL Server MVP Peter DeBetta has recently wrote on the same problem:

http://sqlblog.com/blogs/peter_debetta/archive/2007/02/12/multiple-valued-parameters.aspx

I think his conclusions are different.

 

Post #347111
Posted Friday, August 3, 2007 9:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 26, 2008 9:54 AM
Points: 1, Visits: 8

Well it was great article for the developers who want to know about the advantages of XML in SQL SERVER 2005.

Regards

Mian Rehmat

Local Govt, UK.

Post #387849
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse