arrow
arrow
arrow
When a single entity is related to itself then the relationship is termed as:
Question

When a single entity is related to itself then the relationship is termed as:

A.

One-to-many

B.

One-to-one

C.

Many-to-many

D.

Recursive

Correct option is D

When an entity type participates in a relationship with itself, it’s called a recursive (unary) relationship.
Examples include an employee manages another employee, or a course has prerequisite course.
Cardinality can still be 1:1, 1:N, or M:N, but the entity set on both sides is the same.
In ER modeling, you distinguish the roles with role names (e.g., manager vs subordinate).
Implementation typically uses a self-referencing foreign key in the same table.
Thus, a self-relationship is termed recursive.
Important Key Points

  1. Also called “unary” relationship (vs binary/ternary).
  2. Role names are essential to avoid ambiguity (e.g., parent/child in a hierarchy).
  3. Cardinality still applies: can be 1:1, 1:N, or M:N.
  4. Schema pattern: Add a nullable foreign key referencing the same table (e.g., Employees(ManagerID → Employees.EmployeeID)).
  5. Integrity rules: Use constraints to prevent cycles where inappropriate (e.g., a manager cannot manage themself).
  6. Querying: Hierarchical queries may use recursive CTEs (SQL WITH RECURSIVE) for multi-level traversals.

Knowledge Booster

  • Why not (a) / (b) / (c)? These describe cardinalities (1:N, 1:1, M:N) but don’t indicate that the relationship is self-referential. A recursive relationship can have any of these cardinalities; the defining feature is that the same entity appears on both sides.

Free Tests

Free
Must Attempt

UP SI 2025 Full Mock Test : 01

languageIcon English
  • pdpQsnIcon160 Questions
  • pdpsheetsIcon400 Marks
  • timerIcon120 Mins
languageIcon English
Free
Must Attempt

UP Police Constable Full Mock Test 01

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon300 Marks
  • timerIcon120 Mins
languageIcon English
Free
Must Attempt

Government Policies and Scheme

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon5 Mins
languageIcon English
test-prime-package

Access ‘UPSSSC’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
354k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow