Before you start
This tutorial is Part 2 in a three-part series that demonstrates building a calendar and reminder system using the Derby database. Part 1, "Understanding JDBC" (developerWorks, September 2005), looked at JDBC, creating the basic classes that represent program entities and that access the Derby database in its single-user, embedded form. In Part 2, you'll build three versions of the application.
The first version of the application is a single-user GUI accessing Derby in embedded mode. The second version takes that same GUI and accesses Derby in a multiuser network mode. Finally, you'll use the application classes to create an application that is accessible by both the GUI interface and a Web interface.
Over the course of this tutorial, you'll learn about the following:
- Building a simple GUI application
- Accessing the embedded Derby database from a GUI
- Starting Derby in network mode
- Accessing Derby in network mode
- Creating Derby users and schemas
- Using scrollable cursors
- Accessing a Derby database using a user name and password
- Creating a Web application using servlets
- Accessing the Derby database from within a servlet
- Creating a Web interface for the Derby database application
This tutorial requires some Java programming experience and a knowledge of Java Database Connectivity (JDBC), primarily in how it creates connections to a database. (If you've read Part 1 of this series, you're all set.) Familiarity with SQL is not required. You'll build a GUI application. At least a passing familiarity with HTML is helpful in creating the Web application, but deep knowledge is not required.
To follow along with this tutorial, you need the following tools:
- Java 2 Platform, Standard Edition 1.4.2 or higher. Note that you must have the Java Developer Kit, not just the Java Runtime Environment. Download the Java code from the Sun Web site.
- Apache Derby, which you can download from the Apache Software Foundation.
- JavaMail. To send e-mail reminders, you need mail.jar, which is now part of the Java package. You also need activation.jar, downloadable as part of the JavaBeans activation framework. Make sure both files are in your class path.
- A Web application server, such as Apache's Jakarta Tomcat. You can use any servlet-compatible application server, but this tutorial was written using Tomcat Version 5.5.
- A text editor or Integrated Development Environment (IDE). You can easily create Derby applications using an IDE, such as Eclipse, but I'm going to assume you're using a simple text editor.

