The Compare and Merge utility allows you to reconcile differences between models in the same file or between a model and a database. For example, you have designed and created a model and then created a database based on that data model. A data modeler alters the model and adds a column Gender to the Employee table and simultaneously a DBA alters the Department table in the database and adds a column Name to the table. The model and the database are no longer in synch. Round-trip engineering using the Compare and Merge Utility can now help you reconcile the model with the database.
The Compare and Merge Utility compares, merges, and synchronizes models from a variety of comparison targets. It can perform different kinds of comparisons. You can use the information from these comparisons to perform merges or to create detailed reports.
The Compare and Merge Utility compares a source and a target model. The active diagram, the one you’re viewing and editing, will always be the source, and from it you select a valid target with which to compare and subsequently merges if desired, or to create alter sql to update offline databases.
Note: Targets of logical and physical ER/Studio DA data models can be Repository-based data models including Named Releases, which are read-only archived snapshots of diagrams managed within the Repository.
You can compare and merge a logical model to:
● A physical model in the same .dm1 file.
● A logical model of another ER/Studio DA data model.
● A physical model of another ER/Studio DA data model.
You can compare and merge a physical model to:
● The logical model of the same data model.
● Another physical model of the same data model that shares the same DBMS platform (and version).
● A logical model of another ER/Studio DA data model.
● A physical model of another ER/Studio DA data model sharing the same DBMS platform (and version).
● A live database.
● An SQL file.
When comparing two physical models, make sure they are the same platform and version (i.e. Oracle 11g to Oracle 11g). if they are not the same, then you will only be able to compare to the logical. If you want to compare Oracle to SQL Server, you would need to compare to the logical model from the reverse engineered physical database, then push the changes from the logical model to the original physical model.
You can compare and merge a submodel to:
● A submodel of the same data model.
● The physical model of the same data model.
● An SQL file.
The broad spectrum of valid targets allows for various information-merging strategies. For example, information in the Compare and Merge Utility can be:
● Merged from the current model to a valid target.
● Merged from the valid target to the current model.
● Bi-directionally merged simultaneously between source and valid target.
Note: Objects in SQL 2005 are owned by schemas. A schema can behave like a user, but does not have to be a user. A schema is not explicitly represented in the Data Model Explorer, nor is there a CREATE SCHEMA DDL function. In the Reverse Engineering and Compare/Merge Wizards, the “owner” field in the object editors of ER/Studio DA represents the schema name for an SQL Server 2005 physical model. The field will be the schema list.
A subset of the functionality on the Compare and Merge Utility is used to bring new data source into the diagram for purposes of importing new data sources from the Data Lineage tab.
See Also