EPUB | CHM | PDF

Compare Result dialog

Top Previous Next

Compare Result dialog is shown automatically after comparing diagrams or performing Database Modification. It shows results of comparing for every diagram object in two object trees: left tree show objects in source model and changes in this objects in right tree (target model).

dialog-compare-result

Every object in left tree has one of following changes marks:

compare-added - Object is added. This means that database object does not exist in source model but exists in target model.

compare-deleted - Object is deleted. This means that database object exists in source model but do not exist in target model.

compare-modified - Object is modified. This means that this object was found in both source and target models but one or more of its parameters or sub-objects are changed. Use plus mark near this object's name to see exact differences.

compare-equal - Objects are equal. This means that object was found in both source and target models and there are no any differences between them.

Example: You can see on provided screen-shot that Car Ordering diagram has following changes in compare to physical database `carsandordersdb`:

asdf and table_05 were deleted (they exist in database, but there are no such tables in diagram)
Orders table was added (there is no such table in database, but it is in diagram)
Cars and Cities tables have some changes (table options and columns)
Customers table has no any changes (table in database is equal to table in diagram).

You can use Show changes only checkbox to hide all unchanged objects from both trees. This can be very useful if you compare two models with many objects but with only several changes.

Compare Result dialog allows to perform following actions:

Apply changes to model
You can apply all found differences to diagram. That means that all added objects will be added to diagram, deleted objects will be deleted. All changes for each object will be applied to appropriate diagram object. This is useful if you need to synchronize changes made in physical database with your diagram. Take a look at Diagram Synchronization topic for additional details.
 
You can use checkboxes in right tree to select particular changes for applying to diagram.
 
After pressing Apply changes to model button you'll be prompted to select one of opened diagrams to apply changes. Do not forget to Save your diagram after applying changes. Or you can close diagram without saving changes if something goes wrong.
Generate SQL
This action allows to generate SQL-script for applying all found differences to physical database. There will be CREATE <object> statement generated for every added object, DROP <object> statement for every deleted object and so on. This is useful when you need to apply changes in your diagram to physical database. But there can be more difficult cases: for example comparing two physical databases and synchronizing their structure.
 
You can use checkboxes in right tree to select particular changes for including in SQL-script.
 
After pressing Generate SQL button Modify Database Options dialog will be shown. Take a look at Database Modification topic for additional details.
Close
Just closes this dialog without any changes to database or diagram.

See also:
Diagram: Saving a Diagram
Diagram Functions: Compare Diagram | Diagram Synchronization
Database Functions: Database Modification