Explain one-to-one relationship with example, one-to-one relationship in ER diagram, Define one-to-one relationship
When we would say the relationship is one-to-one?
Assume two entity sets A and B. The relationship between A and B is one-to-one if and only if “an entity in A is associated with only one entity (record) in B and an entity in B is associated with only one entity (record) in A”.
If we put in simpler terms, entity set B is the one side for A and entity set A is the one side for B.
|Sample one-to-one relationships showing links between entities of two entity sets|
- Each passenger is allotted with exactly one seat. [look from passenger to boarding_pass]
- Also, each seat is allotted to exactly one passenger. [look from boarding_pass to passenger]
The ER diagram for this is as follows;
|One-to-one relationship between two entity sets Passengers and Boarding_Pass|
Go to Some facts about relational tables page