Before you start
The IBM Certified Application Developer certification confirms to others that you are an intermediate or advanced level DB2 for Linux, UNIX, and Windows application developer and shows that you have strong skills in all common programming tasks as well as embedded SQL programming, ODBC/CLI programming, .Net programming, or Java programming.
This series of nine free tutorials is designed to help you prepare for the DB2 9 Application Development for Linux, UNIX and Windows certification exam (Exam 733). Each tutorial includes a link to a free DB2 9 for Linux, UNIX, and Windows trial download. These tutorials provide a solid base for each section of the exam. However, you should not rely on these tutorials as your only preparation for the exam.
In this tutorial, you will learn about writing Java code that interfaces with DB2 databases. You'll see how to:
- Connect to a DB2 database from a Java application
- Use JDBC to read and update data in a DB2 database
- Use SQL for Java (SQLJ) to read and update data in a DB2 database
- Troubleshoot a DB2 Java application
This tutorial provides you with the fundamental skills required to develop Java applications for DB2.
To take the DB2 9 Family Application Development exam, you must have already passed the DB2 9 Family Fundamentals exam (Exam 730). You can use the DB2 Family Fundamentals tutorial series (see the Resources section) to prepare for that exam. It is a very popular series that has helped many people understand the fundamentals of the DB2 family of products.
Although not all materials discussed in the Family Fundamentals tutorial series are required to understand the concepts described in this tutorial, you should have a basic knowledge of:
- DB2 instances
- Database objects
- DB2 security
You should also have basic knowledge of SQL and the Java platform before taking this tutorial. You can review the Resources section at the end of this tutorial for more information.
You do not need a copy of DB2 to complete this tutorial. However, you can download a free copy of DB2 Express-C from the DB2 Express-C downloads page.
If you plan to develop Java applications for DB2, or you plan to try out this tutorial's sample code yourself, you need to complete the following tasks:
- Install DB2 9 for Linux, UNIX, and Windows.
- Create the sample database. You can do this from the First Steps Database Creation menu, or by running
db2samplfrom the DB2 Command Line Processor (CLP). The sample code in this article has been written to work with this database.
- Install the Java Runtime Environment, Java 2 Technology Edition Version 1.4.2.
- Update the PATH environment variable to include the jdk\bin directory of the Java SDK you have installed. Note that DB2 includes Java SDK Version 5, in the $DB2PATH\sqllib\java\jdk\bin directory ($DB2PATH/sqllib/java/jdk/bin in UNIX or Linux).