Give an example that maintains a unary relationship

Question

Give an example from your daily life.  Of an entity that maintains a unary relationship with itself. Please describe the entity and the relationship. In English statements and show an ER diagram that describes the entity. And its attributes and the unary relationship incorrect ER notation.

Summary

In the given question we have to show an ER diagram that describes the entity. And its attributes and the unary relationship incorrect ER notation. Also, we will take an example from our daily life of an entity that maintains a unary relationship with itself.

Explanation

In this ER diagram, we will take a person as an entity. So a person has various different attributes such as his name, Surname, middle name, date of birth, nationality, Aadhar number and many more.

We can say that when there is the same entity in both the classes or both things then it is called a unary relationship.

And in our country governor governs the nationality to the person. So this is one kind of relationship. And next is One governor governs many people. So this is one to many relationship. And this relationship will be useful in our ER diagram.

In this diagram we have:

Entity Person
Attributes Aadhar_No, PK
First_name
last_name
mid_name
date_of_birth
Nationality
Relation Governs

 

The ER diagram for this relationship will be:

maintains a unary relationship

 

Also read, Creating an ER diagram for a class and stuck on what entities I can create.

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *