In: Computer Science
4. Consider the following two alternative ER designs:
• a ternary relationship set R that relates entity sets A, B, and C.
• a design in which R is replaced by an entity set E with E related to A, B, and C by 3 binary relationship sets RA, RB and RC , respectively.
Explain why, as stated, these two may not be equivalent. Then explain what could be done to make them equivalent by fixing each of RA, RB and RC , to be 1-1. m-m, 1-m, or m-1.
Solution 1:
Answer: Relationship connects two objects( Entities) in a particular Context.
There are two types of Relationships:
i)Binary Relationship: Between two Entities only
ii) Ternary Relationship: Between Three Entities an Association relationship. It is a relationship derived from the basic relationship of existing two Entities A,B. That Relationship denoted as the third Entity called C.
Example: A Company(A) has Many Employees so Employee(B) is Related to his Company by Works for relation. From That relation a new entity called JOB(C) is derived and used as Job.
Solution2 :
Explain why, as stated, these two may not be equivalent. Then explain what could be done to make them equivalent by fixing each of RA, RB and RC , to be 1-1. m-m, 1-m, or m-1.
Answer:
The above diagram shows the relationships between Entity A and B. B and C, A and C;
Both models of Problem a and b is looking varied but exhibits the same behavior.So Ternary relationship concept simplifies the data model.