Before you start
One of the more frustrating things for any developer is the number of tools that must be used to develop applications -- from text editors, version control software, and deployment tools to database design and management tools. This can become annoying and cumbersome when working on projects, requiring you to switch back and forth between different tools. It can also be very expensive, not only in terms of software licenses but also in terms of developer time because developers have to learn new software applications.
The Eclipse IDE helps solve this problem by offering plug-ins that allow you to use the IDE as a single point to interact with all of your applications. Eclipse plug-ins offer specific functionality while maintaining a consistent user interface. This tutorial will look at how to connect and interact with databases directly from Eclipse, allowing developers a single place to develop software, design, and manage databases.
To follow along with the examples, you will need Eclipse V3.1, SQLExplorer, Azzurri Clay, and Apache Derby, which are all no-cost open source tools. You should be familiar with basic concepts in Eclipse, as well as SQL and database administration.
SQLExplorer allows the Eclipse IDE to access any database that supports a JDBC driver -- practically every major database, providing a simple, convenient, and free method for working with databases without having to use expensive and unfamiliar tools. Since SQLExplorer is also a Eclipse plug-in, you can work within the same IDE without having to switch between tools and products. Another Eclipse plug-in, Azzurri Clay, complements SQLExplorer by allowing you to visualize your database as an Entity Relationship Diagram (ERD) or convert your database from one type to another.
You will need the following tools to follow along:
- Eclipse V3.1
- Download the latest version of Eclipse from Eclipse.org. It's possible to use V3.0 with some changes, but this article will not cover V3.0.
- SQLExplorer V2.2.4
- Download SQLExplorer, the Eclipse IDE plug-in for database query/schema viewer for nearly any kind of JDBC database.
- Azzurri Clay V1.2.0 (freely available Core edition)
- Download Azzurri Clay, a database design tool that runs as a plug-in in Eclipse. It offers a user interface for designing database models graphically.
- Graphical Editor Framework V3.1.1
- Download the Graphical Editor Framework V3.1.1 Runtime.
- Apache Derby 10.1
- Download Apache Derby V10.1. Alternatively, download Cloudscape V10.1 from IBM. Cloudscape is an IBM-supported version of Derby.
This tutorial will be done using Windows® XP, but with minor changes, everything should work on Linux®, Mac OS X, or Solaris.
You need to set up Eclipse V3.1, SQLExplorer, Azzurri Clay, and Apache Derby V10.1 before we begin.
- Download and install Eclipse V3.1. We use <eclipse> in place of Eclipse's home directory, which, for this tutorial, is C:\software\eclipse. You can install Eclipse V3.1 anywhere you like, but make sure to substitute your Eclipse installation home directory when you see <eclipse>.
- Download the Graphical Editor Framework (GEF) V3.1.1. The GEF is needed for SQLExplorer and Azzurri Clay to work correctly.
- Copy the GEF to your Eclipse installation directory, <eclipse>, and unpack it. This should install its files in <eclipse>/eclipse/plugins and <eclipse>/eclipse/Features.
- Download SQLExplorer V2.4.4.
- Copy the SQLExplorer.zip to your <eclipse>/eclipse directory and unpack it.
- Download the Azzurri Clay V1.2.0 Core edition files. Copy the zip file into your <eclipse>/eclipse directory and unpack it.
- Download Apache Derby V10.1.
- On Windows, you can use the Windows Installer. For this tutorial, you will install the Apache Derby V10.1 database to C:\derby. Use <derby> to refer to the Derby home directory.
- On Windows, you can simply install Derby by double-clicking the installer. Make sure to read the installation instructions and the read-me file. Depending on your system, you may need to set class path variables manually.
- The Derby installer should also install an example database you will use for this tutorial in <derby>\demo\databases\toursDB.
You should now be ready to use SQLExplorer and Azzurri Clay from Eclipse V3.1 to work with Derby.

