QAShrink - Query-Aware Shrink Test Databases

QAShrink is an application for reducing the size of a database. It starts from considers an initial database and the set of queries that are executed against it. The database is reduced in order to preserve the SQLFpc coverage (Full Predicate Coverage or MCDC) of the data with respect to the queries.

This tool is described in the following papers:



Download here the latest version of QAShrink. Next, unpack the ZIP file. The following filles will be present in your directory:
After running it for the first time, the following files are generated:

First at all, you must be sure that you have your database running and the appropriate jdbc database driver is in the classpath (or in the folder where the application has been unzipped). Below are some direct links to download the drivers for some databases (maven):

Quick Start

Launch the main class of qashrink.jar using the following java command (where drivername.jar is the name of the vendor's database driver file. Note that you don't need specify a driver name if your are going to use the jdbc-odbc bridge driver):

java -classpath drivername.jar;qashrink.jar in2test.application.qashrink.QAShrink

Alternatively, you may edit the qashrink.bat script file specifying this command and then run the script.

The following window will be displayed:

QAShrink main window

Procedure to generate the reduced database:

Reducing the database

When clicking the Do Shrink button, the reduction process begins. Because this process may take some time, it is executed in a separate thread while showing progress information to the user. Do not press any key until the process finishes.

Afther finishing, all the results of the process are presented at the lower part of the screen.

Populating the destination reduced database

After the Shrinking has been done, you must specify where the reduced database will be created by filling the Destination Reduced Database field. This field must include the full database name (catalog and schema). For instance, in Oracle it is the name of the database user, in SQL Server it is the name of the database, a dot, and the owner (which usually is dbo).

You have two different options:


Specifying connection info

The information required to access the database is explained below:

Supported SQL Syntax, database vendors and drivers

Currently DBShrink supports most of features of SQL (tested with Oracle and SQL Server), including queries with joins, groups, subqueries and views.


Latest builds of these applications has been tested with Java 1.8 on Windows and linux

As it uses standard jdbc methods to discover the database schema, it will work with virtually any database vendor, provided that you have the appropriate jdbc driver.

Release notes

Version Date Changes 2017.02.25 Java 6 to 8 compatibility 2015 Version 2.0 2013 Version 2.0 beta. It supports views, groups, subqueries and reduction optimizations 2009 Initial release