SPT Relational Database Web Tool
Application Manual
Version 1.0

Prepared by
Rakesh Vidyadharan
October 14, 2007


1 Introduction
 1.1 Features
 1.2 Technology
2 Installation

1 Introduction

The SPT Relational Database Web Tool (RWT) is a simple application that can help developers connect to databases configured as DataSource in the application server, or directly through JDBC. The RWT application attempts to replicate basic features found in the popular Aqua Data Studio application. Some simple use cases used as the primary requirements for developing the tool are listed in the appendix. Please see the full document that describes the product, simple use cases, installation notes, etc. You can also browse the javadocs for the application. Full source code is available in googlecode subversion

1.1 Features

The following are the basic features provided by the tool:

  1. Connect to databases configured in application server as DataSources. Configured DataSources are displayed in the application menu.
  2. Display a Connection dialogue through which users may specify the parameters for directly connecting to a database through JDBC. The connection parameters may be saved in which case the Connection will be added to the application menu of available databases.
  3. Display in a Tree the following types of database objects available in the connected database.
    1. The schemas accessible to the user.
    2. The tables available under a schema.
    3. The views available under a schema.
    4. The procedures and functions available under a schema.
    5. The triggers defined in a schema.
    6. The constraints (primary and foreign keys) defined in a schema.
  4. A query exeecution tool launched through a menu (multiple windows are supported). The query tool makes the following features available:
    1. A free text area in which the user enters the query they wish to execute.
    2. An optional text field which can be used to limit the maximum number of matching records fetched from the database.
    3. A “Save” button that can be used to save the current query for easy access via a menu in the future.
    4. The results of the query are displayed in tabular format. The results are pageable and sortable for convenience.
    5. The results of the query can be exported to Excel through a “Export to Excel” button.

1.2 Technology

The RWT application was developed using Echo2 and EchoPointNG for the User Interface and JDBC for database access. Database metadata is fetched using standard JDBC as well as the Information Schema supported by most databases.

Echo2 was used to develop the User Interface to maximise developer productivity. Echo2 helps developers avoid the impedence mismatch between having to implement business logic in Java, and implement the display logic using totally different languages such as XHTML 1.0, JavaScript, …

2 Installation

The RWT application is relatively easy to install. Table 1Software Requirements shows the minimum versions of the software necessary to install the application. The following steps need to be executed to deploy the application to the application server.

  1. Download the sptrwt-1.0.tar.bz2 file from the project home page.
  2. Extract the sptrwt.war file from the downloaded archive.
  3. Create the central directory under which application support files are located. Support files are used to store saved Connection details, saved queries etc. Note that the central directory may need to be on a file server if you wish to deploy the application to multiple nodes. For example, Sans Pareil Technologies, Inc. uses a /var/data/rwt directory as the application directory.
  4. Configure a DataSource named jdbc/rwt in your application server. Refer to the building instructions (see section 3.1) if you wish to configure additional DataSources, or use a differnt DataSource name.
  5. Configure a JVM system property named sptrwt.data.directory for the container. Listing 1lstlisting shows the steps involved in configuring the property For Tomcat. example, add a line similar to the following to $CATALINA_BASE/bin/catalina.sh
  6. Deploy the war file to the application server.

Listing 1:JVMPropertyConfiguration
  $ cd $CATALINA_HOME/bin 
  $ echo JAVA_OPTS=\$JAVA_OPTS -Dsptrwt.data.directory=/var/data/rwt\ \ 
    >> setenv.sh

Table 1: Software Requirements

Software Version Description

Java 1.5 Minimum version of the JRE that is required

Servlet 1.3 Minimum version of the Servlet API that is required.

PostgreSQL8.2 Versions of the database engine application was tested with.

Oracle 10.1 Version of the database engine application was tested with.

Tomcat 5.5.17, 6.0.14Versions application was tested with.