Sign Håvard Rast Blok

SQL Join Checker

SQL Join Checker

The SQL Join Checker is a small utility for verifying database tables included in SQL joins and predicates. For small queries it is fairly trivial to check if tables are populated with data, and that the right keys and values are present to satisfy the joins. However, for large scale systems finding out why an SQL query returns an empty set, can take some effort. The SQL Join Checker will aid this task by showing which tables are empty and indicate which joins might fail.

The SQL Join Checker is heavily dependant on another Source Forge project, JSqlParser, for parsing the input queries and enabling the checker to extract elements of the given SQL.

Download

Download from SourceForge SourceForge.net Logo

Install and configuration

Installation is simple; provided you already have a Java JRE, just download the sqljc jar and add your up your database connection settings in the file joinchecker.conf.

Here is an example of the joinchecker.conf file:
driverName=COM.ibm.db2.jdbc.app.DB2Driver
dbUrl=jdbc:db2:mydb
dbUser=user
dbPass=pass

The joinchecker.conf should be located in a directory in your classpath. So provided it is in your current directory, kick off with this:
java -classpath sqljc-0_1_x.jar:. net.hblok.sqljc.JoinCheckerGUI

Usage

For now, usage is very simple. Type in your SQL in the upper text field, and click Test. Any messages and output will appear in the bottom field.



site: Håvard Rast Blok
mail:
updated: 20 July 2006