What is an entity-relationship (ER) diagram?

Answer

An Entity-Relationship (ER) diagram is a visual representation of the data model for a system. It shows entities (things in the domain — tables), attributes (properties of entities — columns), and relationships (how entities relate — foreign keys). Cardinality notation shows the multiplicity: 1:1 (one-to-one), 1:N (one-to-many), M:N (many-to-many). ER diagrams are used during the conceptual design phase to communicate the data model to stakeholders before implementing it in a specific RDBMS. Tools: dbdiagram.io, Lucidchart, draw.io, MySQL Workbench.