An entity-relationship diagram (ER diagram) is a high-level conceptual sketch of a Relational database’s structure. It shows what the database will contain without committing yet to the exact column types or constraints that the implementation will need.
Three visual elements:
- Entities appear as rectangles (Student, Course, Supervisor).
- Attributes hang off entities as ovals (
Stu_Name,Stu_Age,Cou_Id,Cou_Name). - Relationships between entities appear as diamonds connecting the rectangles (a student studies a course).
ER diagrams are the right level for talking with stakeholders about what the database is supposed to be, before any DDL is written. They’re loose enough that domain experts who don’t know SQL can still read them and check whether the model matches the business reality.
The next step toward implementation is the Relational schema, where attributes become typed columns and primary/foreign keys are made explicit. From there it’s straightforward to write the CREATE TABLE statements that build the database.
The vocabulary for relationships — direction (one-to-many vs many-to-one, depending on which side you read from) and participation (mandatory vs optional, depending on whether a row in one table must have a corresponding row in the other) — is developed in the Relational schema note.