An Entity-Relationship diagram models the database before building tables: entities (things), attributes (properties) and relationships.
A student can take many courses and a course has many students (M:N)
- Cardinality: one-to-one (1:1), one-to-many (1:N), many-to-many (M:N).
- Weak entity — cannot be identified by its own attributes (double rectangle), e.g. Dependent of an Employee.
- Derived attribute (dashed ellipse), e.g. Age from DOB; multi-valued (double ellipse), e.g. Phone numbers.