16.10.2015 Views

Getting Started with DB2 Express-C

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 15 - <strong>DB2</strong> pureXML 265<br />

Thus, depending on your background, if you are an SQL person you may see <strong>DB2</strong> as a<br />

world class RDBMS that also supports XML. If you are an XML person, you would see <strong>DB2</strong><br />

as a world class XML repository that also supports SQL.<br />

Note that IBM uses the term pureXML instead of native XML to describe this technology.<br />

While other vendors still use the old technologies of CLOB/varchar or shredding to store<br />

XML documents, they call those old technologies “native XML”. To avoid confusion, IBM<br />

decided to use the new term pureXML, and to trademark this name so that no other<br />

database or XML vendor could use this same term to denote some differing technology.<br />

pureXML support is provided for databases created as Unicode or non-Unicode.<br />

15.3.1 pureXML technology advantages<br />

Many advantages are provided by pureXML technology.<br />

1. You can seamlessly leverage your relational investment, given that XML<br />

documents are stored in columns of tables using the new XML data type.<br />

2. You can reduce code complexity. For example, Figure 15.5 illustrates a PHP script<br />

written <strong>with</strong> and <strong>with</strong>out using pureXML. Using pureXML (the smaller box on the<br />

left side) the lines of code are reduced. This not only means that the code is less<br />

complex, but the overall performance is improved as there are fewer lines to parse<br />

and maintain in the code.<br />

Figure 15.5 – Code complexity <strong>with</strong> and <strong>with</strong>out pureXML<br />

3. Changes to your schema are easier using XML and pureXML technology. Figure<br />

15.6 illustrates an example of this increased flexibility. In the figure, assume that

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!