There are typically two reasons for creating an application that needs to make use of database technologies. One reason for using database technologies is to create a new lightweight client application. Another reason is to adapt an existing server-side application for use as a lightweight client application.
Enterprise Java™ developers who have written applications requiring the use of JDBC typically rely on obtaining access to the database through a DataSource object. The DataSource object will have already been bound by the Java Naming and Directory Interface (JNDI). The application developer simply needs to locate the DataSource using JNDI, and obtain from the DataSource a connection to the database. The application deployer cooperates with the system administrator to define the mapping and access to a physical database, causing the DataSource object to be bound into JNDI.
Also, in the server environment, database management often falls within the administration realm of a database administrator. A database administrator is typically responsible for creating the physical database, partitioning the database for use among several applications, creating tables and indexes for a particular application, managing the access rights to a database, and monitoring the performance of the database. When the application developer has successfully located a DataSource using JNDI, the developer can obtain a Connection, and begin performing actions against the database.
When adapting a server-side application to run on a client, the application developer often takes more responsibility, performing some roles typically handled by a database administrator. The application developer might be responsible for initially creating the database, creating tables, and configuring the database. In addition, depending upon the set of components available on the client, the application developer might also be responsible for creating the DataSource objects, either directly within the application, or within a JNDI environment on the client. If no JNDI support is available in the client runtime environment, the application developer should use the standard JDBC 3.0 javax.sql.DataSource creation methods. Regardless of how the DataSource object is created or located, application developers still obtain Connection objects from the DataSource, and create Statement objects from the Connection.
Lotus® Expeditor includes the Lotus Expeditor Toolkit, which provides Target Profile support. These Target Profiles simplify the creation and configuration of database application projects, enabling you to select the target-embedded database, and provide automatic management of the requisite JDBC libraries. In an Eclipse SDK plug-in development environment, you can use the standard plug-in dependency tooling to provide the necessary access to DB2e and Cloudscape™ libraries during database application development. Eclipse is an award-winning, open source platform for the construction of powerful software development tools and rich desktop applications.
For more information on JDBC programming please see the SUN JDBC tutorial at http://java.sun.com/docs/books/tutorial/jdbc/index.html.