Chapter 17. Operating on XML Data with SQL

In This Chapter

  • Using SQL with XML

  • XML, databases, and the Internet

The most significant new feature in SQL is its support of XML. XML (eXtensible Markup Language) files are rapidly becoming a universally accepted standard for exchanging data between dissimilar platforms. With XML, it doesn't matter if the person you're sharing data with has a different application environment, a different operating system, or even different hardware. XML can form a data bridge between the two of you.

How XML Relates to SQL

XML, like HTML, is a markup language, which means that it's not a full‐function language such as C++ or Java. It's not even a data sublanguage such as SQL. However, unlike those languages, it is cognizant of the content of the data it transports. Where HTML deals only with formatting the text and graphics in a document, XML gives structure to the document's content. XML itself does not deal with formatting. To do that, you have to augment XML with a style sheet. As it does with HTML, a style sheet applies formatting to an XML document.

SQL and XML provide two different ways of structuring data so that you can save it and retrieve selected information from it:

  • SQL is an excellent tool for dealing with numeric and text data that can be categorized by data type and have a well‐defined size. SQL was created as a standard way to maintain and operate on data kept in relational databases.

  • XML is better at dealing with free‐form data that cannot be ...

Get SQL For Dummies® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.