Generate Class Diagram from Entity Relationship Diagram (ERD)

October 30, 2009 Views: 129,293 PDF Link

Visual Paradigm supports generating class diagrams from ER diagrams (entity relationship diagram). Entities and relationships are mapped with classes and associations accordingly. This tutorial teaches generating class diagrams from entity relationships diagrams and how to synchronize description between classes and entities.

To generate class diagrams from entity relationship diagrams:

  1. We first open Project Browser by selecting View > Project Browser from the toolbar.
    open project browser
  2. Click the New Model button to create a new model.
    new model
  3. Enter the name as Entity Model.
    input eame in model specification
  4. Now, let's create entity relationship diagram under Entity Model. Right click on the Entity Model and select Sub Diagrams > New Diagram....
    create diagram
  5. In the New Diagram popup window, select Database Modeling > Entity Relationship Diagram. Click Ok to confirm.
    create entity relationship diagram
  6. Develop the following entity relationship diagram.
    device support history er diagram
  7. Repeat the above steps to create the following entity relationship diagram under Entity Model.
    device puurchase er diagram
  8. Once the entity relationship diagrams are ready, we can then generate class diagrams from our entity relationship model. Select Tools > Hibernate > Synchronize to Class Diagram from the toolbar.
    synchronize to class diagram
  9. The Synchronize form Entity Relationship Diagram to Class Diagram dialog will be shown. The entity relationship diagrams in your project show on the left hand side of the table and the target class diagram shows on the right hand side.
    er diagram to uml class diagram mapping dialog box
  10. Click on the entity relationship diagram cell and the preview will be shown up.
    preview erd diagram
  11. You can name the target class diagram directly in the class diagram cell or you can synchronize to existing class diagram (if any).
    assign meaningful name to uml class diagram
  12. Press OK to proceed.
  13. Now the Synchronize to Class Diagram dialog will show up. The mapping between entity name and class name, also the column name and attribute name will be listed in the dialog. Let's change the name of the User class to Customer. And change the attribute name from firstname to firstName.
    entity column to class attribute mapping table
  14. We can specify the target for storing the output class diagram. Select Specify... in the Target Parent combo box.
    selecting target model
  15. Select the root node in the tree and press the New Model button. Name the model as Class Model.
    create class model
  16. Press OK to proceed.
  17. Now the class diagrams are being generated.
    generated uml class diagrams
  18. Let's try to modify the description of the class PriorityType.
    modigy priority type class description
  19. You can synchronize the description from class model to the associated entity model by right click on the diagram and select Utilities > Synchronize Class Description to ERD.
    synchronize class documentation to ER diagram
  20. Class Description to ERD dialog will list class models which contain different descriptions with the entity model.
  21. Click on the entity PriorityType in the list and the differences of descriptions between class and entity model will be shown.
    synchronize class documentation dialog box
  22. Select the checkbox under Synchronize column to specify the model you would like to synchronize their descriptions.
    check synchronize classes and entities
  23. By selecting Synchronize members checkbox, the descriptions of the class attribute and entity column will also being synchronized.
    check synchronize member checkbox
  24. Uncheck the Hide equals checkbox and all the classes/entity will be listed, even their descriptions are the same.

Related Links

  1. Full set of UML tools and UML diagrams

You may be interested in

  1. Functional Modeling with Data Flow Diagram Tutorial
  2. Writing Effective Use Case
  3. Modeling Relational Database Design with ERD
  4. Data Flow Diagram: Examples - Food Ordering System
  5. Process Improvement with As-Is and To-Be Analysis
Tags of this article:

Comments (20)

written by Manish on January 19, 2010

Thank you for this much of information this is very helpful for me.

thank you once again.....


written by bimo on February 19, 2010

I cant finde this sync on my workspace.
I'm using VP 7.0


written by Angus Chan on February 19, 2010

1. Which Edition you are using?
2. Sync to different diagram selection available from 7.1 or later.

written by Gianluigi on February 24, 2010

I'm trying the community edition and thinking to buy a different version betwen modeler and standard. what's the lower release with this feature and the creation of SQL (for mySql) from ER Diagram?
thanks for information.


written by jick on February 25, 2010

Hi Gianluigi,

The Professional Edition is the minimum edition that supports this feature and other ORM features like database/orm code generation, and the reversal of database.

If you are looking for database and class engineering, you may consider another product of us, called DB Visual ARCHITECT. The Professional Edition of DB Visual ARCHITECT supports class and entity relationship modeling, and database engineering, and is a more cost effective solution comparing to VP-UML, provided that you only need class and database modeling and engineering features.

For details about DB Visual ARCHITECT, please read:

Best regards,

written by David Lowe on May 4, 2011

is it possible to create the ERD from a class diagram or is it only from possible to create the class Diagram from the ERD?

written by Angus Chan on May 5, 2011

Yes, you can. Please watch following video

written by Marco on February 21, 2013

is this feature available on evaluation copy for enterprise edition?

The tool menu doesn't show the "ORM" option sub menu.

I'm ussing version 10.1 build 20130203
in windows xp sp3 with java jre 1.6.35

Thanks in advance.

written by Jick Yeung (VP) on February 21, 2013

Hi Marco,

VP-UML has undergone many changes since the time this tutorial was written. Therefore, the instruction is a bit outdated. We are sorry about this.

To access the ORM features, please go through this menu: "Tools > Hibernate" instead.

Best regards,
Jick Yeung

written by sooyoung on July 8, 2014

hi I tried to create the ERD from a class diagram but I couldn't do and I got the message "you have no write permission on C://Program Files|Visual Paradigm 11.1"
the reason why I can't do is trial version?

written by Angus Chan on July 8, 2014

The trial should not have this problem. Can you contact our support team by to check your issue?

written by sooyoung on July 8, 2014

i can make class-diagram from erd but i can't create erd from class-diagram. if i click " Synchronize Class Documentation to ERD", nothing is happening. how can i contact your support team? am i email to ""?

written by Ferraz on June 25, 2015

You should put this last issue public because I have the same problem. Can't synchronize ORM persistable classes ant association to ERD. Nothing happens.

written by Jick Yeung (VP) on June 25, 2015

Hi Ferraz,

Could you send us your project for reproduce the problem and for diagnosis? Please send by submitting a ticket at:

Thank you.

written by nanda kishore on March 2, 2016

its not changing class diagram to er diagram when I use synchronize option

written by Jick Yeung (VP) on March 10, 2016

Hi Nanda,

I guess your classes are not >. If this is not the problem, could you submit a ticket to our team to let us check with you in further? You can submit at:

written by on April 1, 2016

i want to generate simple c# classes with properties and functions without orm mapping classes. How can i achieve this?
thanks in advance

written by lenson on April 19, 2016

how can i generate .java from>?I got a warning:(There is no class model available for code generation (16 classes are ignored)."

written by lenson on April 19, 2016

how can i generate .java from orm persistable?I got a warning:(There is no class model available for code generation (16 classes are ignored)."

written by Jick Yeung (VP) on April 20, 2016

Hi Nanda,

I guess your classes are not <<ORM Persistable>>. If this is not the problem, could you submit a ticket to our team to let us check with you in further? You can submit at:

Write comment


Enter the calculation result

security code