Comparing Changes using Complete Compare
You can compare your model with database, script, or another local model to check for differences using the Complete Compare wizard. Based on the results, you can then resolve or merge differences. Thus, maintaining a consistent model and database.
This topic walks you through the steps to compare a DynamoDB model with database.
To compare models with database:
-
Open your DynamoDB model.
Ensure that you are in Physical mode.
For example, the following image uses a DynamoDB model with 11 tables.
-
Click Actions > Complete Compare.
By default, the Complete Compare wizard assigns the open model as the Left Model. Hence, the Right Model Section appears. -
Click Database/Script.
By default, the Allow Demand Loading option is selected. -
Click Load.
The New Model dialog box appears. This starts the reverse engineering process to pull a model from the database to compare. -
Ensure that the Database is set to DynamoDB. Then, click Next.
The Reverse Engineer Wizard appears. -
Click Database. Then, click Next.
The Connection section appears. Use this section to connect to the database from which you want to reverse engineer the model. -
After the connection is established, click Next.
The Tables section appears. It displays a list of available tables. -
Under Available Tables, select the tables that you want to reverse engineer. Then, click
.
This moves the tables under Selected Tables. -
Click Next and in the Option Set section, keep the default configuration.
-
Click Next and in the Detailed Options section, keep the default configuration.
-
Click OK.
The reverse engineering process starts. Once the process is complete, the Right Model is set to the one that you reverse engineered. -
Click Next and in the Type Selection section, select the appropriate options.
For example, the following image shows the default options.
-
Click Next and in the Left Object Selection section, select the appropriate options.
For example, the following image shows the default options.
-
Click Next and in the Right Object Selection section, select the appropriate options.
For example, the following image shows the default options.
-
Click Compare.
The comparison process runs, and the Resolve Differences dialog box appears. It displays the differences between your model and database.
For example, the following image shows that the GameScores table is available in your model but not in the database.
Select the missing table and click. This will move the GameScores table to the right model (from the database). Similarly, resolve other differences.
-
As differences were moved to the right model, click
.
This launches the Forward Engineering Alter Script Generation Wizard. -
Click Option Selection and clear all the Drop check boxes.
-
Click Table Filter and select or verify the tables to be included on the forward engineering script.
-
Click Preview to view and verify the alter script.
-
Click Generate and connect to your DynamoDB.
The forward engineering process starts. The script generates your physical database schema. You can access your database and verify the newly generated schema. -
Click OK. Then click Finish.
This closes the Resolve Differences dialog box and displays the Complete Compare wizard. -
Click Close.
Copyright © 2023 Quest Software, Inc. |