In many cases, users do not want to Reverse Engineer (RE) all objects from a database but would like to only RE specific tables or objects as desired. How can they do that using CA ERwin Data Modeler R7/R8/R9?
The way to Reverse Engineer just a few tables or objects in CA ERwin Data Modeler r7.2 that is to use Complete Compare to first Reverse Engineer a'right model' containing the database objects you want to draw upon and then to import the objects from the'right model' into your model (left model). There are also filters you can use along the way to ease the process. Here are the steps:
- Open the model you want to import the new objects into or create a new blank model (Physical only or Logical/Physical)
- Go to Tools | Complete Compare | Compare and the Complete Compare Wizard will launch.
- In the Left Model Selection, highlight your model (or the blank model) as the left model (in our case, a blank model, Model_1 is the default).
- Select the Right model link, turn on 'Database / Script', and select 'Allow demand loading'.
- Press the Load... button. A 'Reverse Engineer - Select Template' window appears. Select the desired target database.
- Press Next and a 'Reverse Engineer - Set Options' window appears.
- Select the objects that you want to Reverse Engineer in the option set, press Next>, connect to your database, and follow the RE process until the Reversed Engineered model loads as the Right model.
NOTE: it is in the RE Option Set that you may deselect any objects and properties you do not want to Reverse Engineer to make the RE quicker and more streamlined. In the above example (Figure 4), we have deselected all objects except for Table and Table Physical Properties.
Figure 5. Connect to the dbms and RE the Right Model.
Figure 6. The DBMS has been REd and is loaded into the Wizard as the Right model.
- In the Type Selection, select only the objects you would like to import into your blank Left Model.
NOTE: the Type Selection is another area where you may filter on objects and properties for a quicker and more streamlined Complete Compare. In the above example (Figure 7), we have deselected all objects except for Table, Table Physical Properties, and Column.
- Use the Left Object Selection link to choose just the objects you wish to compare from your left model. Use the Right Object Selection link to choose just the objects in your Right Model that you wish to import into your Left Model.
Figure 8. In this example, we are limiting the objects in the right model that we want to import into the left model. Here we have deselected all tables except BONUS, DEPT and E_1. In table BONUS, we have deselected column ENAME.
- Press Compare.
- The Complete Compare Resolve Differences screen will show up. The rows that show 'XXXXX' in the left model are blank rows indicating that those objects do not exist in the left model. The right model will list all of the objects you wish to import.
- Press the left arrow on the specific/desired table names / objects / properties and after pressing the arrow, the table or object will disappear from the screen. That means it has been imported into the Left Model.
- Now press the FINISH button. The tables you left arrow clicked were imported into the model.
Figure 10. The left model shown with the imported tables and columns.
- Save your model to save your changes.