Skip to content
We areTOP 1%

What is the ER model? Explain entity, entity set, attribute and relationship.

EasyConceptER Model
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

The entity-relationship (ER) model is a high-level design model that describes data as entities, their attributes and the relationships among them. It is drawn as an ER diagram and later converted into tables.

  • Entity: a real-world object that can be told apart from others, such as the student Asha. An entity set (or entity type) is the collection of similar entities, such as all students, and it becomes a table.
  • Attribute: a property of an entity, such as roll or name, which becomes a column. A key attribute, drawn underlined, identifies each entity.
  • Relationship: an association between entities, such as a student enrols in a course. A relationship can have its own attributes, such as grade.

Example:

[Student] ----- <Enrols> ----- [Course]
roll, name        grade        course_id, title

Converted to tables: student(roll, name), course(course_id, title) and enrols(roll, course_id, grade), where enrols holds foreign keys to both entity tables.

More in ER Model

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account