MohamedAbbas
MohamedAbbas

Reputation: 1161

between Binary and Ternary (or Higher-Degree) Relationships

What are the differences between an Binary Relationship and a Ternary or Higher Degree Relationships ?

Upvotes: 4

Views: 20918

Answers (1)

user2511414
user2511414

Reputation:

The binary relation is used when two entities have relation directly with each other, here directly is mean a key on child relation should refer to a value which is available on parent table identity/unique key. something like this.
enter image description here
The Ternary, when three or (n) relations have relationship between themselves, and providing all relationship between them makes the database complex, so here the relationships will turned into a relation which has one-to-many/one-to-one with base relations.
example: consider an event in OS, an event would associate with application which registered the event, the device which caused the event, and the component(textbox, button, window,...) which triggered the event.
enter image description here

Upvotes: 5

Related Questions