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

SQL Server 2005: Intro to XQuery Expand / Collapse
Author
Message
Posted Sunday, January 28, 2007 12:40 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:20 PM
Points: 1,276, Visits: 1,135
Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/mcoles/2840.asp
Post #340364
Posted Tuesday, February 20, 2007 6:39 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, January 11, 2012 2:47 PM
Points: 681, Visits: 10,845
First and foremost, I want to say, I am a DBA.  Can someone tell me why this is getting popular?  I read Steve Jones' article, and this one, and I just don't get it.  What value is there to get results in this format?  Is this a format that is used heavily elsewhere?  Please help me understand why I want to learn this...I am not opposed, just never exposed...

-- Cory
Post #346011
Posted Tuesday, February 20, 2007 7:45 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:20 PM
Points: 1,276, Visits: 1,135

Hi Cory,

You're asking if XML is popular?  Yes, it is very widely used.

XML is a very popular format, and it is used all over the place.  A couple of examples:  the newest HTML standard (XHTML) is defined as a subset of XML, Web Services use the XML-based SOAP protocol, even Microsoft Word and Excel can save your documents in XML format.  A lot of websites offer XML-based Web Services as well - several of the popular Geocoding and Mapping API's for instance.

Some of the things that make XML popular are it's human-readable format, its ability to be easily created and read on just about any platform, and the capability of "transforming" an XML document into another XML document very easily.  One very common example is using XSLT to convert an XML document into an XHTML document for display purposes.

Post #346036
Posted Tuesday, February 20, 2007 10:34 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, November 17, 2014 2:18 PM
Points: 1,035, Visits: 411

The most straightforward answer to your question is that XML is so popular because of ignorance.

At the risk of self promotion, I wrote an article on the subject several years ago.  You can find it here:

http://www.sqlservercentral.com/columnists/dpeterson/isxmltheanswer.asp

Do yourself a favor, and stay away from XML.

Michael, you've done a good job of presenting the subject, but it is the subject matter itself that is fatally flawed.




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

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 #346102
Posted Tuesday, February 20, 2007 11:38 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:20 PM
Points: 1,276, Visits: 1,135

Hi DC -

You definitely get your point across well in your article.  The only things I would add are:

1)  You don't need to store native XML in the database in order to take advantage of SQL Server's XML functionality (that seems to be one of your larger concerns); you might have noticed that the XML I used in these articles was not stored in a table on the server

2)  XQuery provides a simple means of querying your XML data based on just about any criteria you care to use (whether you want to retrieve albums by Artist, Genre, Producer, Label, etc.)

3)  XML is not designed to be a replacement for the SQL model

SQL and XML have different goals, different priorities, and I personally believe it's a case of selecting the right tool for the job.  After all is said and done, like SQL, XML is just another tool in the toolbox.

Thanks!

Michael

Post #346119
Posted Tuesday, February 20, 2007 12:57 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, December 19, 2013 8:20 PM
Points: 174, Visits: 100
I use XML to pass multiple records to a Stored Procedure. Since it is not possible to pass a table variable to a SP, XML is the perfect solution since you can hide the result set in XML Nodes...

Michael.
Post #346144
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse