Ternary Relationship in Database
In Ternary relationship three different Entities takes part in a Relationship.
Relationship Degree = 3
For Example: Consider a Mobile manufacture company.
Three different entities involved:
- Mobile - Manufactured by company.
- Part - Mobile Part which company get from Supplier.
- Supplier - Supplier supplies Mobile parts to Company.
Mobile, Part and Supplier will participate simultaneously in a relationship. because of this fact when we consider cardinality we need to consider it in the context of two entities simultaneously relative to third entity.
Cardinality in Ternary Relationship
- Say for a given instance of Supplier and an Instance of Part, can that supplier supply that particular part for multiple Mobile models.
Example − Consider a Supplier S1 that supplies a Processor P1 to the company and the uses the Processor P1 supplied by Supplier S1 in its multiple Models in that case the cardinality of Mobile relative to Supplier and Part is N (many).
- In case of Supplier’s cardinality we can say for a given instance of Mobile one of its Part can be supplied by multiple Suppliers.
Example − Consider a Mobile M1 that has a Part P1 and it is being supplied by multiple Suppliers in that case the cardinality of Supplier relative to Mobile and Part is M (many).
- Similarly, for a given instance of Supplier and an instance for Mobile does the Supplier supply multiple Parts.
Example − Consider a Supplier S1 supplying parts for Mobile M1 like screen, Processor etc. in that case the cardinality of Part relative to Supplier and Mobile is P (many).
Published on 23-Jul-2018 09:07:17