Site Map Contact Us Home
E-mail Newsletter
Subscribe to get informed about
Clever Components news.

Your Name:
Your Email:
 
SUBSCRIBE
 
Previous Newsletters
 






Products Articles Downloads Order Support
Customer Portal     

DB Comparer Description

Features | Detailed Description

The DBComparer component is the key component which performs most of the work comparing Master and Target databases and produces final update SQL script.

The final update SQL script will be applied to Target database and contains all necessary SQL operators and statements required to make Target database structure identical to Master database structure. You can execute the final update SQL script using standard SQL console for your database or by using TxxxSQLExec component (where xxx will be different for different databases).

To extract database structure definitions (metadata) DBC VCL uses set of classes called metadata extractors. There are two different metadata extractors, one to extract metadata from SQL scripts (TxxxScriptExtract classes) and another to extract metadata using live database connection (TxxxDBExtract classes). Each database has own TxxxScriptExtract and TxxxDBExtract classes which knows how to work with this specific database. For example for MS SQL there is a TMSSQLScriptExtract and TMSSQLDBExtract clasess, TIBSctiptExtract and TIBDBExtract for Interbase and so on.

Metadata extractor saves all information about underlying database structure in to a special storage class TDBStructure. This class is unified for all types of databases. Such approach makes possible to compare and synchronize databases structure of different types of databases. For example you can compare and synchronize Oracle and MS SQL databases, MS SQL and dBases databases and so on.

When comparing databases the TDBComparer component uses two TDBStructure storages to store Master and Targets database metadata. To customize the process as much as possible the component has set of properties and options to control various aspects of comparison process. In most cases you will call to ExtractAndCompareDatabases method of TDBComparer component.

Please see the Demos code (DBComparerDemoFib, DBComparerDemoIbo, DBComparerDemoIbx, DBComparerDemoMSSQL, ScriptComparer) and also the indexed Help documentation provided with the Database Comparer VCL installation for more details about using this component.

Property List

   Name    Description
 CompareObjects Is a set of database objects to be compared.
 DBStructureMaster Master database structure used for comparing.
 DBStructureTarget Target database structure.
 ExtractorMaster Master database metadata extractor.
 ExtractorTarget Target database metadata extractor.
 MsgManager Messages list manager.
 ShowFullLog Generate detailed log when comparing databases.
 SQLExec Stores the resulting SQL script.

Method List

   Name    Description
 CompareDatabases Starts the database comparing process.
 ConvertDatabases Converts the Target database structure types into corresponding Master database structure types.
 ExtractAndCompareDatabases Extracts and compares databases metadata.
 ExtractDatabases Extracts metadata from Target and Master databases.

Event List

   Name    Description
 OnAfterCompare Occurs after databases comparison completed.
 OnAfterExtract Occurs after databases metadata extraction completed.
 OnBeforeCompare Occurs before databases comparison started.
 OnBeforeExtract Occurs before databases metadata extraction started.
 OnErrorMessage Occurs when an error is generated during extracting, comparing, or updating the database.
 OnLogNextLine Occurs when a new line has been generated and needs to be saved to log.
 OnProgressUpdate Occurs when the progress has changed.

    Copyright © 2000-2019