ER Diagram Symbols
In this lesson: All ER diagram symbols explained — entity, weak entity, attribute types, relationship, cardinality — with pictures.
Why symbols matter
An ER diagram uses standard shapes so anyone can read a database design at a glance. Each symbol has a fixed meaning — a rectangle is always an entity, an oval always an attribute. Learning these few symbols lets you read and draw any ER diagram.
Rectangle — entity
- Rectangle — a normal entity (Student, Book, Order).
- Double rectangle — a weak entity, which needs another entity to be identified (like a Dependent linked to an Employee).
Entities become tables when the diagram is built into a database.
Oval — attribute
- Oval — a normal attribute (name, age).
- Underlined oval — a key attribute (the primary key, like roll).
- Double oval — a multivalued attribute (can hold many, like phone numbers).
- Dashed oval — a derived attribute (calculated, like age from date of birth).
Attributes become columns in the final tables.
Diamond — relationship
- Diamond — a relationship between entities (Student "enrolls" Course).
- Double diamond — an identifying relationship, linking a weak entity to its owner.
Relationships become foreign keys or link tables in the database.
Lines and cardinality
Lines connect entities to their attributes and to relationships. On relationship lines, cardinality is marked to show how many connect:
- 1 : 1 — one-to-one.
- 1 : N — one-to-many.
- M : N — many-to-many.
Some diagrams use crow's-foot notation (a forked line) instead of letters.
Special shapes
| Symbol | Meaning |
|---|---|
| Rectangle | Entity |
| Double rectangle | Weak entity |
| Oval | Attribute |
| Underlined oval | Key attribute |
| Double oval | Multivalued attribute |
| Dashed oval | Derived attribute |
| Diamond | Relationship |
Common mistakes
- Mixing up oval and diamond. Oval is an attribute; diamond is a relationship.
- Forgetting to underline the key. The key attribute must be underlined.
- Ignoring cardinality labels. Without them the relationship type is unclear.
- Using a single rectangle for a weak entity. Weak entities use a double rectangle.
Summary
- ER diagrams use fixed symbols anyone can read.
- Rectangle = entity; double rectangle = weak entity.
- Oval = attribute; underlined = key, double = multivalued, dashed = derived.
- Diamond = relationship; double diamond = identifying.
- Lines carry cardinality (1:1, 1:N, M:N).
Next, understand the pieces in the ER model, or see them combined in ER diagram examples.
