Difficulty: Easy
Correct Answer: Two relations are created.
Explanation:
Introduction / Context:During logical database design, we translate Entity–Relationship (ER) models into relational tables. A common point of confusion is how to map a many-to-many unary (recursive) relationship, where instances of the same entity relate to each other (for example, Employee mentors Employee). Understanding the correct number of relations ensures a clean, normalized schema.
Given Data / Assumptions:
Concept / Approach:
In relational mapping, a many-to-many relationship is represented by an associative (junction) relation. For a unary many-to-many, we still need a separate relation to store the pairs of related instances, but both foreign keys point to the same parent entity’s primary key.
Step-by-Step Solution:
Create Relation 1: the base entity table (for example, Employee(emp_id, ...)).Create Relation 2: the associative table (for example, Mentorship(mentor_id, mentee_id, ...)).Define foreign keys: mentor_id and mentee_id both reference Employee(emp_id).Add any attributes of the relationship (for example, start_date) to the associative table.Verification / Alternative check:
If you attempt to store the relationship inside the entity table itself, you cannot represent many-to-many pairs without repeating groups or violating normalization. The associative table is necessary and sufficient.
Why Other Options Are Wrong:
One relation: cannot represent many-to-many pairs cleanly.
Three or four relations: unnecessary for a single unary relationship; two suffice.
Common Pitfalls:
Forgetting to add a composite key or unique constraint on (mentor_id, mentee_id) to prevent duplicates; confusing unary with binary relationships.
Final Answer:
Two relations are created.
Discussion & Comments