Developing Apache Derby applications in Eclipse

Source: Internet
Author: User
Tags db2

Overview

The purpose of this article is to show you how to use several different tools in the Eclipse Integrated development Environment (IDE), such as Java Development tools, IBM? DB2? Plug-ins for Eclipse and IBM Integration plug-in for Derby to develop Apache derby applications.

This article describes the entire development cycle of a typical Derby application, starting with the creation of the database, and then experiencing the development of the JDBC client application, the development of stored procedures and functions, and finally the development of the solution. This article also describes how to replace the Apache Derby database with DB2 Universal database (UDB) databases when necessary.

This article assumes that you have a basic understanding of the Apache Derby database, the Eclipse platform, and the DB2 plug-ins for Eclipse.

To illustrate the various tasks involved in application development, author Gilles Roux will provide specific examples and step-by-step instructions on how to build a sample application.

In this example, you need to develop a command-line application to perform inventory management for a bookstore. The bookstore's database stores a variety of books owned by the bookstore and the number of these books available.

This sample application will allow you to access this data and allow you to change the number of books. For example, if you receive a batch of books from a vendor, you should use the application to add the number of books you receive. If the number of books exceeds or falls below a certain limit, you will need to notify the administrator by e-mail so that they can take the necessary action.

Development environment

Tools

Java Development Tools (JDT) is a set of plug-ins built into Eclipse, providing a way to edit, compile, Debug, execute, and deploy general-purpose Java applications.

DB2 Plug-ins for Eclipse provides a set of features to connect to a variety of databases, including IBM Cloudscape and Apache Derby. This plugin is a combination of the following plug-ins.

Connection Wizard: For creating and connecting DB2, Cloudscape, or Derby databases.

Database Explorer view: Used to browse the object of the databases.

SQL Scrapbook: Used to edit and execute separate SQL statements.

Database Output View: Used to sample the contents of a table or to view the execution results of an SQL statement.

Migration Wizard: Used to automatically migrate an existing Derby database to DB2 UDB.

IBM Integration Plug-in for Derby integrates a number of useful Derby tools into the Eclipse environment. The following are the main features provided by the tool:

Apache Derby Nature: Enables the Eclipse project to perform Derby tasks.

Network server: Configure and start the Derby network server directly from the Eclipse project.

IJ: Start the Derby command-line utility directly in interactive mode or script mode in the Eclipse console.

SysInfo: Displays the Derby system information related to the project.

DB2 plug-ins for Eclipse and IBM Integration plug-in for Derby are two separate tools, but they are highly complementary, providing a common database connection, while the latter provides access to many Derby-specific features Diameter.

However, many tasks can be performed by any one of these tools, and the effect is the same. This article mentions a variety of different ways to perform a given task so that each user can choose the way they prefer to work.

Installation Tools

First you download and install DB2 plug-ins for Eclipse. The product includes the DB2 plug-in and is based on Eclipse 3.0, which itself includes JDT.

Then download the Apache Derby plug-in from apache.org and install the software on the basis of the previous software installed.

Finally, download IBM integration plug-in for Derby and install the software on the basis of eclipse. The plugin includes the JCC JDBC driver and the Derby integration tool.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.