Class diagram vs Entity Relationship Diagram

Dear All,

what is the difference between class diagram and ERD? does 1 class i’ve made in myClassDiagram = 1 table in myERD?. Is it allowed if i added some object into myERD that doesnt exist in myClassDiagram?.

Thanks.

Hello Nodeen,

Thank you for your message. About the differences between class diagram and ERD, class diagram/model represent both structural and behavior features of a system (attribute and operations). Classes models act as a mold for the object instance. In class model, classes related to each other in association relationship, part-whole relationship and generalization relationship. Class models are more likely to map into real-world objects.

The entity model more likely to map into tables in database (repetitive records). Although database allow us create foreign keys and constraints to link up the records, but it’s doesn’t imply the relationships which modeled in class diagram, and somehow the relationships in entity models are more difficult to be understand by human.

Generally you can have one class in class diagram mapped to one entity in ERD. But for some situation, you can also have one class mapped to more than one entities, or one entity mapped to multiple classes. This is depends on your design (i.e. performance tune for database).

Of course you can add entity into your ERD without mapping it to classes in class diagram (just like the case mentioned above).

I would like to take this chance to introduce our class-entity synchronization feature to you. The (Professional Edition or above) VP-UML, SDE and DB Visual ARCHITECT support synchronization between your class model and ERD. You can modify the class model and populate the changes into ERD, and vice versa. This changes greatly reduce the effort you needed to do the mapping between object and relational models. And further more we can generate executable source code in Java, C# and PHP out of these models or even existing database which allows you to develop database application in pure object-oriented approach without caring about the how the relational model works.

Please feel free to contact me if you require any further information about this topics.

Best regards,
Rain

can we use ER diagrams rather than using UML diagrams

hello,
can we use ER diagrams instead of using UML diagrams?

When i synchronize from Class diagram to ERD, the generalizations i have in the class diagram are populated into a single relation in the ERD, how can this not happen?