Article on the XML Support in SQL Server 2005

I worked with Shankar to write this article on the XML Support in Microsoft SQL Server 2005 which has just been published on the MSDN XML Developer Center. I would be very interested in comments on how you see an application need for storing XML content in a relational database along with querying and working with this data. E.g. The ability to store WordML documents created from Office 2003.

Comments

  • Anonymous
    May 24, 2004
    I was playing with the idea on paper of the possibility of creating, for instance, a website forum, blog or wiki entirely using XQuery and a good XQuery-supporting Database. If you set up the webserver to send the XQuery immediately to the DB, providing for some method to get HTTP GET and HTTP POST vars such as psuedo-documents, you almost have no need for ASP or other server-side scripting for many types of (simple I/O) web applications. I probably didn't save any of the code fragments I was playing with... but it shouldn't be too hard to cook up an example. (I wonder what such ideas could lead to... ASP scripts embedded in XQuery scripts, perhaps?)
  • Anonymous
    May 24, 2004
    Er, small correction... Obviously a data manipulation language would have to live "side-by-side"... I figure that eventually one should be "integrated" into XQuery, pushing the language that much closer to (T-)SQL.
  • Anonymous
    May 24, 2004
    The support of native XML with indexes in relational databases provides many obvious oportunities in the document and content management arenas, especially as more and more authoring sytems suppport some sort of XML import/export facilties. There are also many other uses.
    Recently I have been working on a Government project where many different application forms are offered via a web interface and validated against form specific schemas, and finally stored in SQL server (following transfer of data using Web services). Given the number of schemas, the fact that the schemas will evolve and change, querying was only required on a subset of data and the fact that we do not need to dynamically change the application form data, it was not a good approach to attempt to create a relational model that covered all of the XML data.

    In order to support various queries and to extarct information from multiple records for display, we did have to shred out various elements/attribute from the XML in order to put them in relational fields (for indexing and ease of extarction). As there are various (and always inceasing number of) schema, we have put in an XSLT normalisation layer to map the various XML structures to something that can be easily loaded into the database. This could all be abandoned when the applciation moves to SQL Server 2005 as the XQuery will support the additonal serachable metadata and extarct subsets of XML data from the instances prior to styling for display.

    There will still be a case for relational data with referential integrity outside the XML but the new facilities will make things simpler.
  • Anonymous
    June 02, 2004
    No doubt that XML is an actractive format to store data. How ever after Object/Relational mapping we have to face Object/Xml mapping. XPathNavigator looks more like a cursor than a business entity, the need of an object presentation of Xml data is nececessary.

    I start mapping a graph of object on an XPahNavigator, XPathEditor, XPathChangeNavigator.
    My first supprise was that XPathDocument can't serialize its change history ( we can't save a modified document beetween two post back in a SQL managed Web Session without loosing changes). I expected to modified the Xml document on the presentation layer (web or win) send it as it is to Yukon for it to be reconcil on a XML Field.

    On second hand, Xml reconciliation on existing data requires a brand new logic and grammar ( xml.modified... ). An XmlDataMerger that apply document changes on an other document will be quite helpfull.

    It will be helpfull to see a full example of an Xml document retrieve from an Xml field on a web layer. Run several asp.net post back to modify the document ( create, delete & update )and make the Yukon reconciliation on a XML Field.

    End user allway ask for what they don't have :O)
  • Anonymous
    July 28, 2004
    SQL Server 2005 Yukon clustering shortcomings
    http://dotnetjunkies.com/WebLog/stefandemetz/archive/2004/07/27/20526.aspx
  • Anonymous
    June 16, 2009
    PingBack from http://lowcostcarinsurances.info/story.php?id=6956