Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Unary or Recursive Relationship
When there is a relationship between two entities of the same type, it is known as a recursive relationship. This means that the relationship is between different instances of the same entity type.
Some examples of recursive relationship can be shown as follows −
An employee can supervise multiple employees. Hence, this is a recursive relationship of entity employee with itself. This is a 1 to many recursive relationship as one employee supervises many employees.
A person can have many children who are also persons. Hence, this is a recursive relationship of entity person with itself. This is a 1 to many recursive relationship as one person can be parent of many persons.
A student can be a class monitor and handle other students. Hence, this is a recursive relationship of entity student with itself. This is a 1 to many recursive relationship as one student is monitor of many students.
