Before you start
This tutorial is recommended for Java and PHP developers who use XML and want to explore the benefits of native XML databases (IBM® DB2® Express-C 9.5 in this tutorial). Although it is helpful to have some knowledge of PHP and Java programming, it isn't necessary to follow along and learn from this tutorial. Knowledge of the XML DOM is also helpful.
This tutorial shows you how to reduce development time with a native XML database. As an illustration, you will change an existing XML schema, and see these changes in the code also. Developers will learn the common necessities for working with a native XML database in both PHP and Java technologies, including how to:
- Connect to the database (DB2 Express-C 9.5)
- Store and retrieve XML data
- Create a form that writes new data to the database
- Create a form that reads existing data from the database
- Query the database using SQL/XML
- Enhance the data viewers to support a quick search function
- Modify the database schema
- Make database changes unnecessary!
To learn and implement the above concepts, you'll create several Web applications where users can enter and view patient data in PHP code, and then enter and view doctor data in Java code.
Beyond a text editor and a browser, you'll need the tools necessary to support Java and PHP servers:
- Java JDK, the latest JDK from Sun to run and compile Java code. This tutorial uses version Java 6 update 5.
- Apache Tomcat, the Web server that will host your Java applications. This tutorial uses version 6.0.16.
- PHP, the latest version of PHP, 5.2.5 at the time of this writing.
- Apache2, the Apache2 HTTP server that is the recommended HTTP server for PHP.
- Operating System, any will do. This tutorial was written on a machine running Windows Vista® Ultimate.
- DB2 Express-C 9.5, the database used for this tutorial. You can use any native XML database such as Apache Xindice instead.