- Derby: A Database for All Seasons
- What Is Derby?
- How to Use Derby
- Setting Up Your CLASSPATH
- Testing Your Setup
- Running Your First Derby Program
- Derby Application Components
- Derby Application Startup
- Loading the Derby Driver
- Database and Connection Creation
- Statement Creation
- Table Creation
- Table Access
- Running the Code
How to Use Derby
The novice Derby user might be a little confused by all the documentation that comes with the product. This wealth of detail somewhat belies the fact that Derby is an open source product! However, Derby also comes complete with fully worked examples that describe how to use the product.
The first step is to download and install a copy of Derby. Next, open a command prompt and change the directory to the folder demo\simple underneath your Derby install folder. On my PC, the full path is this:
In the remainder of the article, we’ll be using the Java program called SimpleApp.java contained in this folder. There are just a couple of steps required to get this program up and running. These steps are the usual pesky CLASSPATH things that go with using Java. So, let’s get these out of the way.