The difference between UML Data profile and ER model

class-diagramdatabase-designdiagramsmodeling

I have been asked this question and even after a lot of research, I cannot find the answer.

When I design a database using Entity relationship (ER) and then re-draw it as UML class model (extended with Data modeling profile for UML), what are the differences and how both models can be (in their way) useful for db developer? With regard to multiplicity, foreign keys..

Best Answer

The level of abstraction provided by Entity Relationship Diagrams created with modeling tools, the entity model provided by EF, and UML class diagrams is almost the same. When I create my POCO entities I generally put them in my Model project with my other domain classes, and so a class diagram of the domain model contains the same POCO entities found in the ERD.

While both models provide for relationships, UML can be more descriptive in its relationships which often reflect some sort of action, behavior, or complex relationships such as interface implementation or inheritance. ERD relationships, on the other hand, are all about keys and multiplicity.

I feel that the model designer provided by the Entity Framework meets my needs for modeling entities. I use a modeler to produce an ERD during the design phase, but I like the entity model to speak for itself after that.

As for UML, I find it very useful for communication and documentation of how software processes behave and interact with one another. These diagrams can be found in the system documentation in the form of use cases, activity diagrams, class diagrams, and sequence diagrams.

Hope this helps.

Related Topic