Degree of Relations in DBMS

Last Updated : 27 Nov, 2025

In real life, every entity—living or non-living—maintains various relationships. For example, a person can simultaneously be a child, a sibling, and a friend. Database systems follow the same concept, where entities are connected through relationships.

In DBMS, the degree of a relationship refers to the number of entity types involved in that relationship. For instance, if a Student entity is connected to a Bag entity through a primary key–foreign key relationship, the interaction between these two entities represents a relationship of degree two.

Types of degree

Now, based on the number of linked entity types, we have 4 types of degrees of relationships.

  1. Unary
  2. Binary
  3. Ternary
  4. N-ary

Let's discuss them one by one with the help of examples.

Unary (Degree 1)

In this type of relationship, both the associating entity types are the same. So, we can say that unary relationships exist when both entity types are the same and we call them the degree of relationship is 1. In other words, in a relation only one entity set is participating then such type of relationship is known as a unary relationship.

Example: In a particular class, we have many students, there are monitors too. So, here class monitors are also students. Thus, we can say that only students are participating here. So the degree of such type of relationship is 1.

unary
Unary

Binary (Degree 2)

In a Binary relationship, there are two types of entity associates. So, we can say that a Binary relationship exists when there are two types of entity. Or in other words, in a relation when two entity sets are participating then such type of relationship is known as a binary relationship. This is the most used relationship and one can easily be converted into a relational table. 

Example: We have two entity types 'Student' and 'ID' where each ‘Student’ has his 'ID'. So, here two entity types are associating we can say it is a binary relationship. Also, one ‘Father’ can have many ‘daughters’ but each ‘daughter’ should belong to only one ‘father. We can say that it is a one-to-many binary relationship.

binary
Binary

Ternary (Degree 3)

In the Ternary relationship, there are three types of entity associates. So, we can say that a Ternary relationship exists when there are three types of entity and we call them a degree of relationship is 3. Since the number of entities increases due to this, it becomes very complex to turn E-R into a relational table. Now let's understand with the examples.

Example: We have three entity types ‘Teacher’, ‘Course’, and ‘Class’. The relationship between these entities is defined as the teacher teaching a particular course, also the teacher teaches a particular class. So, here three entity types are associating we can say it is a ternary relationship.

tarnary
Ternary

N-ary (n Degree)

In the N-ary relationship, there are n types of entity that associates. So, we can say that an N-ary relationship exists when there are n types of entities. There is one limitation of the N-ary relationship, as there are many entities so it is very hard to convert into an entity, rational table. So, this is very uncommon, unlike binary which is very much popular.

Example: We have 5 entities Teacher, Class, Location, Salary, Course. So, here five entity types are associating we can say an n-ary relationship is 5. 

nary
N-ary
Comment
Article Tags:

Explore