Reverse Engineering Models

You can create a data model from a database or a script using the Reverse Engineering process.

This topic walks you through the steps to reverse engineer a DynamoDB model. For detailed description of reverse engineering options, refer to the Reverse Engineering Options topic.

To reverse engineer a model:

  1. In erwin Data Modeler (DM), click Actions > Reverse Engineer.
    The New Model screen appears.

  2. Click Logical/Physical and set Database to DynamoDB.

  3. Click Next.
    The Reverse Engineer Process Wizard appears.

  4. Click one of the following options:

    • Database: Use this option to reverse engineer a model from a database.

      If you click Database, continue to step 5.

    • <Script Name> Script: Use one of these options to reverse engineer a model from a script. You can either use AWS CLI Script or Python Script option for reverse engineering. Selecting this option enables the File field. Click Browse and select the a script file from your directory.

      If you click <Script Name> Script, see step 11 below.

  5. Click Next.
    The Connection tab appears.
  6. Enter your User Name and Password.
    The following table explains the connection parameters.
  7. Parameter Description Additional Details
    Connection Method Specifies the type of connection you want to use.
    Select DIRECT (CLOUD) to connect to a database on a cloud. Or, select DIRECT (LOCAL) to connect to a local database.
     
    Hostname/IP Specifies the hostname or IP address of the server where your database is hosted in the following format:

    http://localhost

    This option is available when Connection Method is set to DIRECT (LOCAL).
    Port Specifies the port configured for your database For example, 9142.
    This option is available when Connection Method is set to DIRECT (LOCAL).
    Access Key ID Specifies access key id for connecting to a database on cloud For example: AKIAI00EXAMPLE56OSFODNN7
    This option is available when Connection Method is set to DIRECT (CLOUD).
    Secret Access Key Specifies access key for authenticating the database connection For example: FEwJalrnMDMI/K7ENGXUt/EXAMPLEKEY/b1xwfiCu
    This option is available when Connection Method is set to DIRECT (CLOUD).
    Region Specifies the location of the remote database

    For example: us-east-2

    This option is available when Connection Method is set to DIRECT (CLOUD).

  8. Click Connect.
    On successful connection, your connection information is displayed under Recent Connections.

  9. Click Next.

    The Tables tab appears. It displays a list of available tables.

  10. Under Available Tables, select the tables that you want to reverse engineer. Then, click .

    This moves the selected tables under Selected Tables.

  11. Click Next.
    The Option Set tab appears. It displays the default option set. You can either use the default or a custom option set.

  12. Click Next.
    The Detailed Options tab appears. Set up appropriate options based on your requirement.

  13. Click OK.

    The reverse engineering process starts.

    Once the process is complete, based on your selections, a schema is generated and a model is created.

Along with Tables, other object such as Indexes and Items are also retrieved.

You can view these objects via the model diagram or view their properties via the Model Explorer. Right-click an object and then, click the required Properties option. For example, on the model diagram, right click a table and then, click Table Properties. The DynamoDB Table Editor appears. You can view the table properties here.