To
highlight
the impact
of using DB2
native XML
support on
PHP
application
code and
relational
schema
design, the
scenario
creates a
parallel
environment
using a
database
that does
not have any
XML
capabilities
(for
example,
MySQL). We
show the
difference
in the
application
code,
database
queries, and
the
relational
schemas for
the two
environments.
Introduction
PHP enables a simple
Web application
development and
deployment environment.
This is one of the
reasons for its
popularity. DB2's native
XML capabilities, coming
in the next version and
referred to as the
DB2 Viper release,
further simplify the
development process.
This simplification
appears in the form of:
- Smaller
application code
size and reduced
complexity
- Simpler
relational schema
- Better
management of schema
evolution due to
changing business
requirements
To understand the
foundation of DB2's
native XML support, we
recommend that you start
by reading a DB2
Magazine article,
Firing Up the Hybrid
Engine by Anjul
Bhambhri, DB2
development manager for
native XML support.
In this article, we
build on that foundation
and demonstrate the
effectiveness of using
DB2's native XML
capabilities to simplify
the application code and
the relational schemas.
We will also look into
the effects of changes
in the business
requirements on the data
(schema evolution) and
its impact on the
application code and the
relational schema.
To illustrate our
reasoning we will follow
a usage scenario modeled
around an online shop
selling antique
silverware to registered
customers.
Some of the points we
will show in the course
of the scenario are:
- The ease of
setting up a PHP
environment
- The ease of
integrating DB2
native XML
functionality with
PHP applications,
including Web
services written in
PHP and XQuery
- Pushing the
business logic and
data transformations
into the database,
using XQuery, stored
procedures, and
views.
The DB2 XML features
we will be using in the
scenario will cover the
following areas:
- XML document
storage in a column
as a parsed
structure
- Using XQuery to
search and publish
- Support for XML
in DB2 stored
procedures and views
- Use of XML
indexes to boost
performance
To highlight the
impact of using DB2
native XML support on
PHP application code and
relational schema
design, the scenario
will create a parallel
environment using a
database that does not
have any XML
capabilities (for
example MySQL). We will
explore the difference
in the application code,
database queries and the
relational schemas for
the two environments. We
will explain our
justification for
choosing a particular
code, schema, or query,
and the alternatives if
possible.
Back
Next
|