Open Source Rule-Based Data Checking
Open Source
Using ChkDB
ChkDB Tables
E-R Diagram

Tiny Sample
Data Domain
Do Checks

External Links
Data Quality and
Data Profiling
(a glossary)

ChkDB Project Home Page

What ChkDB is...

ChkDB is Open Source software used to do rule-based data checking and data quality profiling.

ChkDB is composed of an Oracle PL/SQL package (and some SQL scripts) plus files that define...

  • Data Domains - tables and/or views to be checked, and,
  • Rule-Sets - rules that can be applied to data domains.

ChkDB does not currently have any GUI front-end.

Giving it a spin...

  1. Download the latest from:
  2. move the downloaded file to an empty directory,
    cd to the directory and either:
    unzip or tar -xzf xxx.gz
  3. sqlplus user/password
  4. SQL> @setup_chkdb.sql create a few tables and a stored package
  5. SQL> @run_samples.sql setup sample tables and views, run checks and query the results
  6. Check the new file chkdb_samp_results.txt. (At the bottom of this file, CHKDB_RULE_ERR_COUNT should be zero.)
  7. SQL> @remove_chkdb.sql remove ChkDB from your database

How ChkDB is used...

ChkDB might be used inside an application, but at the lowest level, it works like this...
  1. ChkDB is downloaded and installed in a database to be checked. This creates a handful of tables and a stored PL/SQL package.
  2. Files defining data domains and rule-sets are loaded. This adds rows to ChkDB tables.
  3. You review and adjust the ACTIVE_YN flags on domains, tables, rule-sets and rules.
  4. You execute a procedure to apply the rules to specified database tables. The results are added to a ChkDB table.
  5. You review the results (via SQL*Plus or externally linked tables in Microsoft Access, or some other application).

ChkDB does not currently include any GUI applications or front-ends. In Oracle, all the functionality of ChkDB is available through SQL*Plus.

Why Use ChkDB?

Using ChkDB can be to your advantage...

  • You can download tested software at no charge.
  • ChkDB may include domains and rule-sets that you can use as starting points.
  • You will get the benefit of future contributions by other users of ChkDB.
  • You may be able to contribute software, domains or rule-sets.

A New Domain for Your Database

If you want to create a new domain for checking tables in your database, a good technique is to define a set of tables/views with just the columns required for checking. Rules can then be written for this abstract domain. To do checking, the domain is implemented either
  • as a set of views into your database, or,
  • as a set of tables that are populated from your database before the checking is done.
This technique is flexible, and it makes it possible for you to contribute domains and rule-sets without telling the world exactly how your corporate databases look.

Open Source

ChkDB is OSI Certified Open Source Software as a result of the way it is licensed. Contributers copyright their contributions and license them with the MIT License.

This means that you can do pretty much whatever you want with ChkDB software, domains and rule-sets... use them, distribute them, build them into your commercial application, whatever.

See for information on the Open Source Initiative.

Why Contribute to ChkDB?

Why would it be to your advantage to contribute? Because you get the benefit of contributions by others, and if you can make ChkDB better, more people will use it and more people will contribute. The incentive works the same way for everyone - making ChkDB more useful will attract more people with an incentive to make ChkDB more useful.

See the Contributing page for more information about becoming involved in this project.

What ChkDB Really Needs

ChkDB really needs a GUI front-end, an application to...
  • review domains and rule-sets, and change the ACTIVE_YN flags,
  • run checks on one or more tables (by calling a procedure in a PL/SQL package),
  • delete domains and rule-sets (by calling procedures in a PL/SQL package),
  • export and import domains and rule-sets as XML files,
  • define new domains and rule-sets.

A simple application to do just the first two items would be a big step forward at this point.

If You Use ChkDB...

You can use this logo on your website if it links back to

ChkDB - Data Checking

If anyone can make a higher quality version of this button logo, it would be welcome.

This project was started by Brian Marshall of CleanDB in Calgary.