SPT Relational Database Web Tool
October 14, 2007
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
The following are the basic features provided by the tool:
- Connect to databases configured in application server as DataSources. Configured
DataSources are displayed in the application menu.
- 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.
- Display in a Tree the following types of database objects available in the connected
- The schemas accessible to the user.
- The tables available under a schema.
- The views available under a schema.
- The procedures and functions available under a schema.
- The triggers defined in a schema.
- The constraints (primary and foreign keys) defined in a schema.
- A query exeecution tool launched through a menu (multiple windows are supported). The query
tool makes the following features available:
- A free text area in which the user enters the query they wish to execute.
- An optional text field which can be used to limit the maximum number of matching
records fetched from the database.
- A “Save” button that can be used to save the current query for easy access via a
menu in the future.
- The results of the query are displayed in tabular format. The results are pageable
and sortable for convenience.
- The results of the query can be exported to Excel through a “Export to Excel” button.
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
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.
- Download the sptrwt-1.0.tar.bz2 file from the project home page.
- Extract the sptrwt.war file from the downloaded archive.
- 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
- 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.
- 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
- Deploy the war file to the application server.
$ 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.
|PostgreSQL||8.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.14||Versions application was tested with.