Before you start
This series of tutorials demonstrates how to use the Derby database to develop a calendar and reminder system, divided into three parts, this is the 2nd part. Part 1th, "Understanding JDBC" (developerworks,2005 September), examines JDBC, creating basic classes that represent program entities and access a single user-embedded Derby database. Part 2nd will create three versions of the application.
The first version is the single user GUI that accesses the embedded mode Derby. The second version uses the same GUI to access Derby in Multi-User network mode. Finally, use the application classes to create applications that can be accessed through the GUI interface and the Web interface.
In this tutorial, you will learn:
Build a simple GUI application
Accessing the embedded Derby database from the GUI
Start Derby in network mode
accessing Derby in Network mode
Creating Derby Users and schemas
Use a scrollable cursor
Accessing the Derby database with user name and password
Creating a Web application with a servlet
Accessing the Derby database in the servlet
Creating a Web interface for a Derby application
Prerequisite conditions
Learning this tutorial requires some Java programming basics and Java Database Connectivity (JDBC) knowledge, especially how to establish a connection to a database. (If you've read the 1th part of this series, you'll see.) Do not need to be familiar with SQL. We will create a GUI application. A basic understanding of HTML is helpful when creating WEB applications, but requires no further knowledge.
System Requirements
The following tools are required to read this tutorial:
Java 2 Platform, Standard Edition 1.4.2 or higher. Note that you must have a Java Developer Kit, not just the Java Runtime environment. Download Java code from the Sun Web site.
Apache Derby can be downloaded from Apache Software Foundation.
JavaMail. Sending a message prompt requires Mail.jar, which now belongs to the Java package. Activation.jar is also required and can be downloaded as part of the JavaBeans activation framework. These two files must be in the classpath.
WEB application servers, such as Apache Jakarta Tomcat. You can use any application server that supports the servlet, but Tomcat Version 5.5 is used in this tutorial.
Text Editor or integrated development environment (IDE). Using an IDE like Eclipse makes it easy to create a Derby application, but I assume you use a simple text editor.