Degree of Relationship in DBMS

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

In this article, we explore the concept of 'degree of relationship' in Database Management Systems (DBMS). This term refers to the number of entities involved in a relationship. Using Entity-Relationship (E-R) diagrams, we'll illustrate how different entities like employees, departments, and projects interconnect within a database. Understanding these relationships is crucial for effective database design, and our guide simplifies this complex topic with clear examples and diagrams.

er diagram of the degree of relationship in dbms

The above figure illustrates an E-R diagram.

There are 4 types of degrees of relationship based on the involved entities-

  • Unary relationship
  • Binary relationship
  • Ternary relationship
  • N-ary relationship

Unary Relationship

As the name suggests, in a unary relationship, only one entity is involved. There is only a single entity set, i.e., the association is between a single entity. Here, the degree of relationship is 1. The unary relationship is also known as a recursive relationship.

Example: In the college presidential elections, a president is chosen among the students. He/she leads the entire community and looks after the student-centric activities. Even though he/she is the president, after all she is a student. So we can say that there is only one entity i.e., the student.

Unary relationship in dbms

The figure illustrates the unary relationship.

Transform Your Career

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program

Binary Relationship

You must have rightly guessed that in a binary relationship, there are two entities involved. There are two entities that are participating in the relationship. The degree of relationship is 2. This is the most common type of relationship.

Example- Each Indian citizen has their own Aadhar Card so we can say that citizen and Aadhar Card are two entities involved.

Binary relationship in dbms

The above figure illustrates the binary relationship.

Transform Your Career

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program

Ternary Relationship

In a ternary relationship, there are three entities involved. There are three entities that are participating in the relationship created. The degree of the relationship is 3. As in this relationship, the number of entities increases, it is a bit difficult to convert it to a relational table.

Example- A student studies in a school, so student and school are two entities. But, the same student also takes some coaching classes, so he has a relation with coaching as well, so the coaching class is also an entity. Here as there are 3 entities, so it is a ternary relationship.

Ternary relationship in dbms

The figure illustrates the ternary relationship.

Turn Learning into Career Growth

1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary
1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary

N-ary Relationship

This is a generalized form of a relationship when the n number of total entities are participating. When there is an n number of involved entities, we can say that they have an N-ary relationship. As there are many entities involved, it is hard to convert them to a relational table. It is an uncommon relationship that is not as widely used as a binary relationship. The degree of relationship is 'n'.

Example- Let us consider the example of a university. It has many entities like students, teachers, affiliated colleges, courses, etc. Here, there are many entities associated with the university.

N-ary relationship in dbms

The above figure illustrates the N-ary relationship.

Conclusion

  • In DBMS, the degree of relationship is the number of entities that have taken part in the relationship.
  • We can analyze the E-R diagram and tell the degree of relationship between various entities.
  • The degree of relationship in DBMS can be categorized as a Unary, Binary, Ternary, or N-ary relationship.
  • In a unary relationship, only one entity is involved. Here, the degree of relationship is 1. The unary relationship is also known as a recursive relationship.
  • In a binary relationship, there are two entities involved. The degree of relationship is 2.
  • In a ternary relationship, there are three entities involved. The degree of relationship is 3.
  • In an N-ary relationship, there is an n number of involved entities. The degree of relationship is 'n'.

Read More:

Hiring Partners:
GGoogleAAmazonMicrosoftFFlipkartAAdobe1200+ more