How to Group Entities in ERD Database Designer?

deletet-keyLast week, we showed you how to assign entities in an ERD to a schema. One of our users ask if there is any way to group entities in a logical manner, rather than setting the schema property reserved for physical database.

The answer is yes. You can make use of model or UML package to store and categories the entities in logical groups. The grouping can be seen in both the Model Structure and diagram. In this article, we will show you how to group entities in ERD database designer. In order to perform the steps described in this article, make sure you have Visual Paradigm installed.

Group ERD Entities in ERD Database Designer

  1. Start Visual Paradigm.
  2. Create a new project by selecting Project > New from the toolbar.
  3. Name the project and click Create Blank Project.
  4. Create an ERD by clicking on Diagram > New in toolbar. In the New Diagram window, select Database Modeling >Entity Relationship Diagram. Click OK to confirm.
  5. This creates the ERD database designer where you can model your database. Draw two sets of entities in the ERD. In this article, we will draw some human entities and some entities for non-human objects.

    Some Entities are Created in ERD Database Designer

    Some Entities are Created in ERD Database Designer

  6. Let’s create two packages to wrap the two sets of entities. In the diagram toolbar next to the ERD database designer you can see the Package tool. Click on it.

    Select the package tool

    Select the package tool

  7. Let’s say I want to group the Student, Teacher and Administrator entities. Move the mouse pointer to the top left of the Student entity. Press on the diagram and drag to bottom right to create a package.

    Create Package in ERD Database Designer

    Create Package in ERD Database Designer

  8. Release the mouse button. Name the package human.

    Package Created

    Package Created

  9. Similarly, create another package for the non-human entities. Finally, the diagram should look like this.

    Entities Contained by Package

    Entities Contained by Package

  10. That’s it. If you look into the model structure under project browser by selecting View > Project Browser from the toolbar, then click Model Structure, this is how you can group your entities with package shape. Besides seeing the grouping in diagram, you also can see the grouping under model structure, which looks like this:

    Project Browser with packages of entities

    Project Browser with packages of entities

Group ERD Entities in Model Structure under Project Browser

Now you may have a question: If my entities are loosely placed in ERD database designer, and I have no way to place them all in one place, how do I create a package around them?
Well, then you may consider to group entities in model structure under project browser. Let me show you how.

  1. In Model Structure, right click on the project root node and select Model > New Model… from the popup menu. Model is a container-type element that allows you to put your elements inside, for grouping and categorizing. It’s a like package and if you like you can create a package instead (Model Element > New Model Element > Package).

    Create a new Model

    Create a new Model

  2. Name the model in the Model Specification window and click OK. In this article I name the model human and I will put the human entities in it.

    Name the Model

    Name the Model

  3. You can see the model right under the Model Structure. I have also created another model called non-human

    Name the Model

    Name the Model

  4. So now, I have two models. What I have to do is to drag my entities to the two models respectively.

    Drag Entities into Model

    Drag Entities into Model

  5. At the end, I have two models, with each one containing a set of entities. With this approach, you don’t need to edit your database designer.

    Entities into Model

    Entities into Model

 

Related Articles

Related Links

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply