DOWNLOAD THE CODE:
Download the Code 7643.zip

Is the introduction of XML in SQL Server a good thing?

Microsoft has recently started embracing Extensible Markup Language (XML), but embracing XML is different from putting it natively into a product. SQL Server administrators and database developers haven't missed full integration of XML in SQL Server, but they've now come to realize that they needed XML all along. In the next version of SQL Server, XML output will be a standard option, letting you create a channel of information—including information pulled directly from the SQL Server—that you can pass to other systems. If you combine XML and Data Transformation Services (DTS), bulk copy program (bcp) will continue to slip out of use, to the delight of most database developers and administrators.

XML is available today only in a manner of speaking. You can use the language today with extensions that Microsoft released for use with SQL Server 6.5 and 7.0. These extensions are more workarounds than real solutions. The real strength of XML will come with the next release of SQL Server. But you can use the tools available today to begin working with XML, if you haven't already, and to start understanding what you can and can't do with it.

What is XML?
XML's purpose is to solve the problem of exchanging data between systems. XML solves this problem by providing a self-describing data set. In other words, when you receive data from a query, XML provides the data and descriptive information about the data. The idea behind XML is to separate the data from the work of manipulating and presenting the information.

If you're familiar with HTML, XML will look suspiciously similar to HTML, but infinitely more noisy to read. By noisy, I'm referring to the number of tags that XML operations contain, including grams (commands sent to the server) or data or formatting tags. But the high number of tags is unavoidable if the data and formatting are to succeed as self-describing. For an example of an XML set, consider the snippet in Listing 1, page 22.

Without knowing what this snippet represents, you can see that it's two Web site listings, each with the site URL, owner, description, and other information about the site. The fact that you can discern this information is exactly the point of XML.

If you use XML with an application, the application no longer needs to know about the underlying data source (SQL Server), nor does it need to know about the data structure. Removing this requirement means you can write more generic applications. You'll be able to write an application, for example, that reports on information in the database without needing to know the information structure ahead of time.

In terms of implementation, XML is in its infancy. Microsoft is implementing it more natively in Internet Explorer 5, and the next version of SQL Server reportedly will support XML as a standard protocol. Including XML will be a boon to Internet development, making it easier for developers to build generic Web sites that run on the data behind the scenes.

Are Apples Red or Yellow?
One of XML's great strengths is that you can use it to describe your data in ways that are meaningful and in ways that a third-party application can use. But this capability introduces some interesting problems. For example, if I asked you the name of the fruit that you're eating, and you said apple, I'd know a bit more about what you were eating, but not all that I needed to know. After all, apples can be Red Delicious, Golden Delicious, Granny Smith, or another variety.

What you need is a more standardized way to describe the data. Specifically, you need the equivalent of a dictionary to help decipher and define the data-element descriptions so that others can understand them. Is the code that is your unique identifier on your inventory an iCode, ItemCode, Item_Code, or something else?

Initiatives are under way to address standardized data. The BizTalk Web site at http://www.biztalk.org shows a schema library and provides discussions about industry segments and the data elements that are specific to the segments.

The fact that these initiatives are forming introduces an interesting question—one that the IT industry will need to address before XML is fully accepted. If XML, with its self-describing data sets, is such a strong solution for building applications, why do these initiatives need to launch these standardization efforts? Isn't standardization one of XML's touted benefits?

   Prev. page   [1] 2     next page



You must log on before posting a comment.

If you don't have a username & password, please register now.