Skip to content
We areTOP 1%

What are mapping cardinalities and participation constraints in an ER diagram?

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

Answer

Mapping cardinality states how many entities on one side of a relationship can be associated with one entity on the other side. Participation states whether every entity must take part in the relationship.

  • One-to-one (1:1): a person has at most one passport, and a passport belongs to one person.
  • One-to-many (1:N): a department has many employees, but each employee works in one department.
  • Many-to-many (M:N): a student takes many courses, and a course has many students.
  • Total participation (double line): every entity must take part, such as every employee belonging to a department. Partial participation (single line): only some entities take part, such as the few employees who manage a department.

Example: Converting each case to tables:

  • 1:N Department-Employee: put dept_id as a foreign key in employee.
  • M:N Student-Course: create a separate table enrolment(roll, course_id) with the composite primary key (roll, course_id).
  • 1:1 Person-Passport: put person_id in passport as a foreign key with a UNIQUE constraint.

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