2. Getting Started#
This chapter describes the key concepts that helps running dataCompJ more effectively.
This chapter consists of the following sections:
- Terms for dataCompJ
- Inconsistent Records
- Synchronization Policy
Terms for dataCompJ#
Master DB#
Master DB indicates Altibase database containing original data between two heterogeneous databases to be compared.
Slave DB#
Slave DB indicates the other database to which the replicated data is applied between the two heterogeneous databases to be compared.
TablePair#
TablePair means the comparison target of dataComJ specified by the user, and it is in table unit. TablePair represents a pair comprised of a table (Master table) in Master DB and a table (Slave table) in Slave DB.
Master Table#
Master table is a orginal table in the Master DB specified by the user in TablePair.
Slave Table#
Slave table is a comparison target table in the Slave DB specified by the user in TablePair.
Inconsistent Records and Synchronization Policy#
Inconsistent records signify records whose column values are inconsistent based on the primary key of the master and slave tables. The inconsistent record can be divided into three types as in the following.
MOSO inconsistent#
This is a case in which particular records with the same value of primary key columns can be found in both Master and Slave DB, but the value of non primary key columns are different from each other.
MOSX inconsistent#
This is a case in which records with values of primary key columns can be found in Master DB, but not in Slave DB.
MXSO inconsistent#
This is a case when there exists particular records with values of primary key columns only in Slave DB, not in Master DB.
Resolving Inconsistent Record#
When dataCompJ discovers inconsistent records, the two following functions are provided depending on the user's choice as delineated in dataCompJ configuration file.
- DIFF: This function distinguishes inconsistent records between Master tables and Slave tables and records them to a CSV format file.
- SYNC: This function distinguishes inconsistent records between Master tables and Slave tables and resolves the inconsistency based on the synchronization policy delineated in the dataCompJ configuration file.
Synchronization Policy#
Synchronization policy defines how to match up the records in slave tables in accordance with the records in master tables when dataCompJ discovers any inconsistent records. The synchronization policy provides the following three methods.
MOSO Inconsistency#
This method updates records with the same primary key in slave tables based on the master table records with UPDATE_TO_SLAVE policy.
MOSX Inconsistency#
This method is used to insert a record, which exists in the master table but not in the slave table, into the slave table with INSERT_TO_SLAVE policy.
MXSO Inconsistency#
This method deletes records, which exists only in the slave table, but not in the master table, from the slave table with DELETE_FROM_SLAVE policy.