Entity–Relationship Diagram

Although ER diagram could be used for both conceptual and logical data modeling, in the "UML times" it is rare to see domain to be modeled with ERD. Where the ERD is still popular is modeling databases. What UML Class Diagrams are for the object-oriented world, ERDs are for the world of relational databases.

There are multiple ERD notations, the following picture uses the "Crow's Foot/Martin/Information Engineering style" which is the most common in software engineering:

aa

Since ERD diagrams are used for modeling real databases, the entities in the previous diagram are the actual database tables along with their columns modeled exactly how they were created in the real database. The model could even contain constraints such as primary keys and others. The visualization of entities and their attributes is very similar to the class diagram, what is different is the representation of the relationships:

aa

Note: ER models are usually created for the particular database system such as Oracle DB or MySQL, so they could be vendor-specific. For example, the data types, or constraints could be different for various database types.