DB Corrector - tool is adapted for correcting any sort of data inconsistent and generating structure difference script for database. Input in the system is structure description of database in a XML document and rule or description of commands of what we want of engine to do. DbCorrector consists of engine, rules and xml inputs.
Rules - array of commands to engine of what we want to do on database. DB Corrector now consists features:
FK Cleaner - for database with no foreign constraints and for preparing database for creating foreign constraints. FK Cleaner outputs report of data pending records (records that contains nonexisting keys) and report of nonexisting data is needed by other records. You can erase all pending data or create dummy records to satisfied constraints. At the end generate sql script with foreign key constraints and run on database.
Change Management - generator structure difference script for database.
ID Compressor - for system that programmatically calculate record identifier and last values stores in one table. When you have big gaps for IDs and reaches to the max value and need all IDs value ordered bigger +1 then preceding in all tables.
Merger - more than one records need to merge in one record and all relation bind in the record and the remains delete.
Synchronizer - when two system consist identical or similar tables. You can equalize data specifying tables, columns and relations which should consist same values .
Engine - base of engine are class responsible for table definition data and for manipulating the data and class that contains concrete data of a record from the table. This idea can easy adopt for business application when you need dynamically created forms usually for code tables.
XML Inputs -in a XML format you put description of database, all tables, all relations and constraints and indexes to know DB Corrector how database should look.
Currently DB Corrector supports only DB2 but it is easily adopted for others database.
Environment: Java, Lomboz, Castor, IBM DB2, IBM Web Sphere Application Developer 5.1.2, XML, EJB, Velocity, Ant, Linux, Windows