[Welcome]

jSQLRunner 2.0

by   Wei Tang (wtang@cc.gatech.edu)

http://disl.cc.gatech.edu/download/jsqlrunner


SourceForge.net Logo

1. Introduction:

jSQLRunner is a pure Java package aiming at providing a uniform access interface to databases from various vendors via JDBC connection. Theoretically, jSQLRunner can access any database system that supports JDBC. Some sample database vendors are:

  • DB2 Universal Database
  • Hsqldb
  • InstantDB
  • MySQL
  • Oracle
  • SimpleText DB
  • SQL Server
  • tinySQL

2. Requirements

  • OS: ANY! (since it's Java :-)
  • JDK1.2 and above
  • Any one of the supported database sources. Some provide evaluation copies (Oracle, DB2) or free download (InstantDB, MySQL, SimpleText DB, and tinySQL).

3. Installation

No installation needed. Get the Zip file (including separate jar files) and uncompress it. Or you can download the Executable Jar file bundled with SimpleText DB driver and tinySQL driver.

4. Running jSQLRunner

After you have unzipped the downloaded file, you can run it from the shell.

  • For example (if you are using SimpleText DB driver):
    java -cp jsql20.jar:cqutil.jar:gnu.jar:simpleTX.jar disl.export.jsqlrunner.jSQLRunner (Unix)
    java -cp jsql20.jar;cqutil.jar;gnu.jar;simpleTX.jar disl.export.jsqlrunner.jSQLRunner (Windows)

If you are using the executable Jar file,

  • Under Windows, double click the file to run. Or type:
    java -jar jsql20bundle.jar
  • Under Unix/Linux, type:
    java -jar jsql20bundle.jar

Note: you must set up the correct java classpath environment.

We also provide an online demo of jSQLRunner using Java Web Start technology ( test whether you have JWS installed). Click the image below:

5. jSQLRunner query output formats:

The following formats for query result are provided:

  • DEFAULT:
table format in the Java window
  • HTML:
HTML table format (plain text)
  • HTMLHEAD:
HTML format for the query result table header only (plain text)
  • LINE:
column count followed by column names, then column data (plain text)
  • RAW:
raw result with predefined separators (rows & columns) (plain text)
  • RAWHEAD:
raw result header with predefined separators (plain text)
  • RAWHEADRESULT:
raw result header only (plain text)
  • XML:
XML format (predefined DTD) (plain text)
  • XMLHEAD:
XML format for the query result table header only (plain text

6. About JDBC:

Type 1:
The JDBC-ODBC bridge provides JDBC API access via most ODBC drivers. Note that some ODBC binary code and in many cases database client code must be loaded on each client machine that uses this driver, so this kind of driver is most appropriate on a corporate network, or for application server code written in the Java programming language in a 3-tier architecture.
Type 2:
A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine.
Type 3:
A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol This net server middleware is able to connect all of its Java technology-based clients by a server.to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC API alternative. It is likely that all vendors of this solution will provide products suitable for Intranet use. In order for these products to also support Internet access they must handle the additional requirements for security, access through firewalls, etc., that the Web imposes. Several vendors are adding JDBC technology-based drivers to their existing database middleware products.
Type 4:
A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver. Several database vendors have these in progress.

7. Screenshots:


Figure 1: connection panel


Figure 2: query panel (1)


Figure 3: query panel (2)


© Copyright 2003, Disl Group, by Wei Tang (wtang@cc.gatech.edu)