Database Management System (DBMS) / ER Model

Degree of Relationship

πŸ§‘β€πŸŽ“ What is Degree of Relation?

The degree of a relationship refers to the number of entity sets (or tables) involved in a relationship.

It tells how many different entity types are connected together through a single relationship.


1️⃣ Unary Relationship (Degree 1)

A relationship that involves only one entity set, relating instances within the same set.

πŸ“˜ Example:

  • An employee supervises another employee

  • Entity: Employee

  • Relationship: Supervises

πŸ“ ER Diagram:


2️⃣ Binary Relationship (Degree 2)

A relationship that involves two different entity sets.

πŸ”Ή This is the most common type of relationship.

πŸ“˜ Example:

  • A student enrolls in a course

  • Entities: Student, Course

  • Relationship: Enrolls

πŸ“ ER Diagram:


3️⃣ Ternary Relationship (Degree 3)

A relationship that involves three different entity sets.

πŸ“˜ Example:

  • A doctor prescribes a medicine to a patient

  • Entities: Doctor, Medicine, Patient

  • Relationship: Prescribes

πŸ“ ER Diagram:


🧠 Summary Table:

πŸ”’ Degree

πŸ” Meaning

🧾 Example

Unary (1)

One entity related to itself

Employee supervises Employee

Binary (2)

Two different entities involved

Student enrolls in Course

Ternary (3)

Three different entities involved

Doctor prescribes Medicine to Patient