ER/Studio - Embarcadero Technologies Product Documentation
ER/Studio - Embarcadero Technologies Product Documentation ER/Studio - Embarcadero Technologies Product Documentation
USING ER/STUDIO > CREATING AND WORKING WITH DATA MODELS What Can the Compare/Merge Utility Do? 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. You can compare and merge a logical model to: • A physical model in the same .dm1 file. • A logical model of another ER/Studio data model. • A physical model of another ER/Studio 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 data model. • A physical model of another ER/Studio data model sharing the same DBMS platform (and version). • A live database. • An SQL file. NOTE: Targets of logical and physical ER/Studio 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 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 represents the schema name for an SQL Server 2005 physical model. The field will be the schema list. EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 58
USING ER/STUDIO > CREATING AND WORKING WITH DATA MODELS 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 Using the Compare and Merge Utility Updating an Offline DBMS Resolving and Reporting on Model Differences Comparing Models and Submodels Using the Compare and Merge Utility, you can compare two models, two submodels, or a model with a submodel and merge any differences found, if required. You can also report on the differences and if you want, synchronize your source model with another model or update the source or target models selectively. NOTE: When comparing or merging with a physical data model or SQL imported data model that was not initially created by reverse-engineering an existing database, you must synchronize constraint names between the data model and the database in order to generate correct ALTER SQL. The Compare and Merge Utility may not generate the SQL correctly unless the target model (physical or SQL import) has the same constraint names as the database. 1 Click File > Open and display the source data model or submodel. TIP: You can save time by selecting diagram objects on the data model before opening the utility. Objects that are pre-selected in this manner will be already in the object tree of the utility. 2 In the Data Model Explorer, click the model or submodel to be the comparison source. 3 Click Model > Compare and Merge Utility. NOTE: The number of pages and options in the Compare/Merge utility vary depending on what kind of compare/merge you perform and the source and target models selected. 4 The Compare and Merge Utility Wizard will walk you through the rest of the process. Page 1 TIP: If you right-click anywhere on the object tree, you can select or deselect all objects using the short-cut menu. You can also display or hide object owner names for those objects with owners. The following describes the options that require additional explanation: • Compare against a Repository based DM1 file: Compares a data model with a Named Releases managed within the ER/Studio Repository. When you select this option, ER/Studio opens the Repository Operation Status dialog box and the Get From Repository dialog box. This process connects to the current Repository Server defined in the Repository Options (Repository > Repository Options). The Model Compare and Merge wizard automatically gets the diagram from the Repository. For more information, see Configuring the Repository. • Compare against an SQL file This option is available when the current model selected is a Physical data model. The selected SQL file must be of the same database platform as the current model. When you select this option, ER/Studio imports the SQL file and compares it to the current model. • Compare against a live database: If you select this option, a page appears where you can select the database and connection type. The connection type can be either ODBC or Native/Direct Connection. For information about connecting to databases, including troubleshooting information, see Connecting to Database Sources and Targets. EMBARCADERO TECHNOLOGIES > ER/STUDIO® 8.0.3 USER GUIDE 59
- Page 7 and 8: CONTENTS Optimizing Repository Perf
- Page 9 and 10: Welcome to ER/Studio ER/Studio is a
- Page 11 and 12: WELCOME TO ER/STUDIO > DATABASE SUP
- Page 13 and 14: ER/STUDIO OVERVIEW > ER/STUDIO FAMI
- Page 15 and 16: ER/STUDIO OVERVIEW > APPLICATION IN
- Page 17 and 18: ER/STUDIO OVERVIEW > APPLICATION IN
- Page 19 and 20: ER/STUDIO OVERVIEW > APPLICATION IN
- Page 21 and 22: ER/STUDIO OVERVIEW > APPLICATION IN
- Page 23 and 24: ER/STUDIO OVERVIEW > APPLICATION IN
- Page 25 and 26: ER/STUDIO OVERVIEW > CONFIGURING AN
- Page 27 and 28: ER/STUDIO OVERVIEW > CONFIGURING AN
- Page 29 and 30: ER/STUDIO OVERVIEW > CONFIGURING AN
- Page 31 and 32: ER/STUDIO OVERVIEW > CONFIGURING AN
- Page 33 and 34: ER/STUDIO OVERVIEW > CONFIGURING AN
- Page 35 and 36: ER/STUDIO OVERVIEW > DATA MODELING
- Page 37 and 38: ER/STUDIO OVERVIEW > DEVELOPING A D
- Page 39 and 40: Using ER/Studio This section includ
- Page 41 and 42: USING ER/STUDIO > CREATING AND WORK
- Page 43 and 44: USING ER/STUDIO > CREATING AND WORK
- Page 45 and 46: USING ER/STUDIO > CREATING AND WORK
- Page 47 and 48: USING ER/STUDIO > CREATING AND WORK
- Page 49 and 50: USING ER/STUDIO > CREATING AND WORK
- Page 51 and 52: USING ER/STUDIO > CREATING AND WORK
- Page 53 and 54: USING ER/STUDIO > CREATING AND WORK
- Page 55 and 56: USING ER/STUDIO > CREATING AND WORK
- Page 57: USING ER/STUDIO > CREATING AND WORK
- Page 61 and 62: USING ER/STUDIO > CREATING AND WORK
- Page 63 and 64: USING ER/STUDIO > BEST PRACTICES 8
- Page 65 and 66: USING ER/STUDIO > COMMON TASKS Comm
- Page 67 and 68: USING ER/STUDIO > COMMON TASKS Movi
- Page 69 and 70: USING ER/STUDIO > COMMON TASKS Copy
- Page 71 and 72: USING ER/STUDIO > COMMON TASKS Chan
- Page 73 and 74: USING ER/STUDIO > COMMON TASKS 3 To
- Page 75 and 76: USING ER/STUDIO > COMMON TASKS The
- Page 77 and 78: USING ER/STUDIO > COMMON TASKS 4 Co
- Page 79 and 80: USING ER/STUDIO > COMMON TASKS Sync
- Page 81 and 82: USING ER/STUDIO > COMMON TASKS In c
- Page 83 and 84: USING ER/STUDIO > COMMON TASKS Adva
- Page 85 and 86: USING ER/STUDIO > COMMON TASKS Asso
- Page 87 and 88: USING ER/STUDIO > COMMON TASKS Comp
- Page 89 and 90: USING ER/STUDIO > COMMON TASKS Dime
- Page 91 and 92: USING ER/STUDIO > COMMON TASKS •
- Page 93 and 94: USING ER/STUDIO > COMMON TASKS See
- Page 95 and 96: USING ER/STUDIO > COMMON TASKS The
- Page 97 and 98: USING ER/STUDIO > COMMON TASKS The
- Page 99 and 100: USING ER/STUDIO > COMMON TASKS •
- Page 101 and 102: USING ER/STUDIO > COMMON TASKS 3 In
- Page 103 and 104: USING ER/STUDIO > COMMON TASKS Chan
- Page 105 and 106: USING ER/STUDIO > COMMON TASKS •
- Page 107 and 108: USING ER/STUDIO > COMMON TASKS Shap
USING <strong>ER</strong>/STUDIO > CREATING AND WORKING WITH DATA MODELS<br />
What Can the Compare/Merge Utility Do?<br />
The Compare and Merge utility allows you to reconcile differences between models in the same file or between a<br />
model and a database. For example, you have designed and created a model and then created a database based on<br />
that data model. A data modeler alters the model and adds a column Gender to the Employee table and<br />
simultaneously a DBA alters the Department table in the database and adds a column Name to the table. The model<br />
and the database are no longer in synch. Round-trip engineering using the Compare and Merge Utility can now help<br />
you reconcile the model with the database.<br />
The Compare and Merge Utility compares, merges, and synchronizes models from a variety of comparison targets. It<br />
can perform different kinds of comparisons. You can use the information from these comparisons to perform merges<br />
or to create detailed reports.<br />
The Compare and Merge Utility compares a source and a target model. The active diagram, the one you’re viewing<br />
and editing, will always be the source, and from it you select a valid target with which to compare and subsequently<br />
merges if desired, or to create alter sql to update offline databases.<br />
You can compare and merge a logical model to:<br />
• A physical model in the same .dm1 file.<br />
• A logical model of another <strong>ER</strong>/<strong>Studio</strong> data model.<br />
• A physical model of another <strong>ER</strong>/<strong>Studio</strong> data model.<br />
You can compare and merge a physical model to:<br />
• The logical model of the same data model.<br />
• Another physical model of the same data model that shares the same DBMS platform (and version).<br />
• A logical model of another <strong>ER</strong>/<strong>Studio</strong> data model.<br />
• A physical model of another <strong>ER</strong>/<strong>Studio</strong> data model sharing the same DBMS platform (and version).<br />
• A live database.<br />
• An SQL file.<br />
NOTE: Targets of logical and physical <strong>ER</strong>/<strong>Studio</strong> data models can be Repository-based data models<br />
including Named Releases, which are read-only archived snapshots of diagrams managed within<br />
the Repository.<br />
You can compare and merge a submodel to:<br />
• A submodel of the same data model.<br />
• The physical model of the same data model.<br />
• An SQL file.<br />
The broad spectrum of valid targets allows for various information-merging strategies. For example, information in the<br />
Compare and Merge Utility can be:<br />
• Merged from the current model to a valid target.<br />
• Merged from the valid target to the current model.<br />
• Bi-directionally merged simultaneously between source and valid target.<br />
NOTE: Objects in SQL 2005 are owned by schemas. A schema can behave like a user, but does not have<br />
to be a user. A schema is not explicitly represented in the Data Model Explorer, nor is there a<br />
CREATE SCHEMA DDL function. In the Reverse Engineering and Compare/Merge Wizards, the<br />
“owner” field in the object editors of <strong>ER</strong>/<strong>Studio</strong> represents the schema name for an SQL Server<br />
2005 physical model. The field will be the schema list.<br />
EMBARCAD<strong>ER</strong>O TECHNOLOGIES > <strong>ER</strong>/STUDIO® 8.0.3 US<strong>ER</strong> GUIDE 58