Reverse Database without Overwritting Entities

When you reverse database, you will find all existing entities are overwritten in the project. This article is going to teach you how to solve this problem.

Assume you have DB Schema ERD.

DB Schema

DB Schema

If you don’t want entities are overwritten after reverse database, do as follows:

  1. Make sure that you select the ERD, but not any particular entities. In Property pane, select Logical from the combo box of Data Model.

    Select Logical

    Select Logical

  2. Next, create a new model under project node. Right click on the project node and select Model > New Model… from the pop-up menu.

    Create a new model

    Create a new model

  3. Name the new model as Logical Data Model.
  4. You can add DB Schema under Logical Data Model. Right click on Logical Data Model and select Sub Diagrams > Add Existing Diagram… from the pop-up menu.
  5. In the Add Sub Diagrams window, check DB Schema and then press OK button.
    All entities of DB Schema will be put under Logical Data Model automatically.

    Add DB Schema under Logical Data Model

    Add DB Schema under Logical Data Model

    Otherwise, you can assign all entities under Logical Data Model manually.

  6. Now, you can reverse database to the project. Select Tools > Database > Reverse Database… from the main menu.
  7. In the Database to Data Model dialog box, click Next button.

    The Database to Data Model dialog box

    The Database to Data Model dialog box

  8. Specify your user name and password. Click Next button.

    Database configuration

    Database configuration

  9. Select the schema(s) you want to reverse. Click Next button.

    Check dbo

    Check dbo

  10. You can see the selected schema(s) are listed on the right hand side. Click Next button.

    Selected entities

    Selected entities

  11. When the Reverse Entities dialog box prompts out, select and drag them on the diagram. Click Close button.

    Select and drag entities

    Select and drag entities

  12. As a result, reversed entities are listed in Model Explorer.

    Reversed entities are listed in Model Explorer

    Reversed entities are listed in Model Explorer

1466 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply