A UML diagram can be used both to model database designs and class designs, but an ER diagram should be used exclusively in database problems. How do you pick one graphical representation over the other?
The results indicate that ER model is generally better in relationship name and participation representation than the UML class diagram. On the other hand, UML class diagrams provide a better representation for the cardinality relationship compared with ER diagrams.
The main difference between UML and ER diagrams is that UML is a language used to create diagrams, whereas ERDs are a type of diagram. UML is used for planning software development, and is used in many different diagrams for various purposes.
ER model is used to represent real life scenarios as entities. The properties of these entities are their attributes in the ER diagram and their connections are shown in the form of relationships. An ER model is generally considered as a top down approach in data designing.
ER diagrams specify what data we will store: the entities and their attributes. They also show how entities relate to other entities. Another advantage of ERDs is that they represent the data in a graphical manner. This makes it easier for business folks to understand.
Just use always UML since it kind of subsumes ER. The only reason to use ER would be if you´re using a tool (e.g. to generate the DDL SQL scripts to create the tables) that only supports ER (now most do support UML but you may still find some that sticked to ER)
ERD - Entity Relation Diagram - giving you image of how the tables should connect, what fields are going to be on each table, the tables connection, if many-to-many, one-to-many.
UML can be used for many diagrams other then ERD. sequence diagram, state diagram, more for the funcionality of the application (what user can do, who does it, when he does it, before what step, what table he use to do it) other then the tables description.
I Would use ERD to describe database relation and UML to describe operations, time, actions, etc..
Refer wiki : Entity-relationship_diagram & Unified_Modeling_Language
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With