Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Develop SQL databases with Eclipse, SQLExplorer, and Clay

Yes, you can use Eclipse to develop database-enable applications

Robi Sen (rsen@department13.com), Freelance Writer, Department13
Robi Sen is the vice president of Department13 LLC, which is a boutique information and technology services company focusing on Fortune 1000 companies and government organizations. He spends most of his time on developing large enterprise-scale applications and has spoken extensively on the topics of enterprise application integration and service-oriented architectures.

Summary:  Learn how to use Eclipse and the SQLExplorer plug-in to connect to any database that supports a JDBC driver. These tools allow you to view database schemas, view table data, add and edit table data, and write, edit, and execute SQL. You will also learn how to use Azzurri Clay to create Entity Relationship Diagrams (ERDs), reverse-engineer databases, add tables, edit tables, delete tables, edit relationships, add indexes, and change your underlying data model into different SQL dialects.

Date:  29 Nov 2005
Level:  Intermediate PDF:  A4 and Letter (1260 KB | 34 pages)Get Adobe® Reader®

Activity:  14631 views
Comments:  

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.

About this tutorial

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.


Prerequisites

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.


System requirements

You need to set up Eclipse V3.1, SQLExplorer, Azzurri Clay, and Apache Derby V10.1 before we begin.

  1. 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>.
  2. Download the Graphical Editor Framework (GEF) V3.1.1. The GEF is needed for SQLExplorer and Azzurri Clay to work correctly.
  3. 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.
  4. Download SQLExplorer V2.4.4.
  5. Copy the SQLExplorer.zip to your <eclipse>/eclipse directory and unpack it.
  6. Download the Azzurri Clay V1.2.0 Core edition files. Copy the zip file into your <eclipse>/eclipse directory and unpack it.
  7. Download Apache Derby V10.1.
  8. 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.
  9. 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.
  10. 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.

1 of 8 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source
ArticleID=133354
TutorialTitle=Develop SQL databases with Eclipse, SQLExplorer, and Clay
publish-date=11292005
author1-email=rsen@department13.com
author1-email-cc=troy@backstopmedia.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.