13.9. Exploiting XML


SQL:2003 introduced XML as a new built-in data type. XML data is strongly typed: XML values are assumed to be tree-like data structures that are distinct from their representation in the form of a text string. The XML type can be used wherever other SQL types are allowed: in table columns, as parameters of a routine, as variables, and so on. Although relational data and XML data are both structured, there are some significant differences between them. The Table 13.5 identifies a few distinctive points.

XML data can be stored in a database either in a text column (i.e., char, varchar, or dob) or in a column of data type xml. A textual representation might be preferred if it is important to retain the textual fidelity ...

Get Information Modeling and Relational Databases, 2nd Edition now with O’Reilly online learning.

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