How-to and Why Control the Visibility of Connectors in ERD when Reverse Database

00-erd-conn-thumbThe reverse database tool of VP-UML provides a handy approach to instantly convert a relational database into an ERD, to aid in the studying of database structure, entities properties and their inter-relationships.

Being able to study a database with an ERD is great because ERD is so easy to read and understand. However, the relationships among entities may increase the complexity of diagram when there are many entities and are highly coupled. If you just want to focus on seeing the database tables and their columns, but not pretty much interested in their inter-relationship, you can optionally form an ERD database diagram with solely entities, without including their relationships. In this article, you will see how to form an ERD from a MS SQL database, with just entities showing in the diagram. You will also learn how to optionally show the relationships.

  1. Run VP-UML.
  2. There is an application option to determine whether or not to show relationship connectors for shapes appear in diagram, resulted by a drag-and-drop operation. You have to turn it off before reversing database. Select Tools > Application Options from the main menu.
  3. In the Application Options window, select Diagramming from the list on the left hand side.
  4. Open the Connector tab.
  5. Uncheck the option Show relationship connectors for dropped models. Note that this option will affect all the drag and drop operations, which means that if you attempt to drag multiple related shapes from Model Explorer to diagram, with this option is off, there won’t be any relationship created. Therefore, by the end of this article, we recommend you re-enable this option.

    Not to show relationship in drag and drop

    Not to show relationship in drag and drop

  6. Click OK to confirm the change and return to VP-UML.
  7. Now, let’s move on to reversing database to ERD. Select Tools > Database Reverse… from the main menu.
  8. The wizard-like screen appear. Keep the option Popup entities tree selected for Result. Click Next.

    Popup an entities tree to form ERD

    Popup an entities tree to form ERD

  9. Select and specify the driver, driver file, connection URL, user and password of your database.  Click Next.

    Fill in the database connection information

    Fill in the database connection information

  10. For some database management tools, like MS SQL, you are asked to schema. Select and click Next. If you are not asked to select schema, just ignore this step.

    Select the Schema

    Select the Schema

  11. All the database tables in the selected schema are listed and will be reversed into VP-UML during the reverse engineering of database. If you want the engine to exclude certain database tables, select the database tables to be excluded and click Next. Note that to reverse a database table doesn’t mean to have it appear on ERD. You have the option to show any reversed table into an ERD.
  12. When the reverse database tool has finished its work, you are prompted the Reverse Entities window, plus a new ERD opened in background. What you need to do now is to fill in the ERD with the entities you want. To do this, select the entities in the Reversed Entities window, drag and drop onto the diagram in background.
    Form an ERD with reversed entities

    Form an ERD with reversed entities

    ERD is instantly formed. As you can see from the image below, the entities are visualized, without have their relationship appeared.

    ERD formed from MS SQL database

    ERD formed from MS SQL database

  13. Let’s say if you want to optionally show a relationship between particular entities, try this: In the ERD, right click on any entity that involves in the relationship and select Related Elements > Visualize Related Model Element… from the popup menu.
  14. In the Visualize Related Model Element window, select the relationship to visualize and click Visualize at the bottom.
    Visualize relationship among database tables

    Visualize relationship among database tables

    Now you can see the relationships. 🙂

    ERD with relationships

    ERD with relationships

Related Articles

Related Links

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply