Some Usages for XML

  • yousef Ekhtiari

    Ten Centuries

    Points: 1283

    Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/yEkhtiari/2822.asp

  • Marina Odino

    SSC Rookie

    Points: 47

    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).

  • Frank Thompson-290923

    SSC Veteran

    Points: 290

    This was a very useful article. What is the size limit to the VARCHAR(max) declaration?

  • Lisa Slater Nicholls

    Hall of Fame

    Points: 3311

    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<

     

  • Lee Roper

    SSC-Addicted

    Points: 475

    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...

  • DCPeterson

    SSCoach

    Points: 15145

    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

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

  • Alexander Kuznetsov

    SSCrazy

    Points: 2217

    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.

     

  • Mian Rehmat

    Grasshopper

    Points: 13

    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.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply