 | Level: Introductory Dirk deRoos (dirk.deroos@gmail.com), Information Architect, IBM
22 Feb 2007 Learn about writing Java® code that interfaces with DB2 databases. This is Part 7 in a series of nine tutorials that you can use to help prepare for the IBM® DB2® 9 Family Application Development Certification exam (Exam 733).
In this tutorial
- Learn about writing Java code that interfaces with DB2 databases.
- Acquire the fundamental skills required to develop Java applications for DB2.
Objectives - 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
Prerequisites
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" 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.
System requirements
You do not need a copy of DB2 9 to complete this tutorial. However, if you wish, you can download a free copy of DB2 Express-C 9 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
db2sampl from 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).
Duration
Less than two hours
Formats html, pdf
|  | |  |