How to Decide Between ERD and UML for Data Modeling

database-designerd

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?

Best Answer

There is no earth-shattering difference between a data model depicted in UML notation versus a data model depicted in any of the many common ER notations. They all depict the most important elements: entity types and relationships.

Depending on which graphical convention you choose, there may be other features of the model which are conveyed, such as the attributes of entity-types, relationship cardinality, strong or weak associations, etc.

The point of the model is to communicate your design.

You should choose the graphical convention that is most expressive of the information that you're trying to convey with the least "noise" (unimportant information).

You should also take into consideration the needs of your audience. No matter how artfully your diagram conveys the information you intend to transmit, if your audience isn't comfortable with the notation then you will have not achieved your goal. If your audience is familiar with IDEF1X then use that, if they are most comfortable with Martin or Chen then use those. If UML does the job and is what is familiar, then UML ER notation is best, otherwise it isn't.