Question

Explain how a unary relationship can be described as one-to-one, one-to-many, and many-to-many if there is...

Explain how a unary relationship can be described as one-to-one, one-to-many, and many-to-many if there is only one entity type involved in the relationship

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Unary Relationship :- An ENTITY TYPE linked with itself, also called recursive relationship. Example

Roommate, where STUDENT is linked with STUDENT

Mapping Unary Relationship between the instances of single entity is also called Recursive Relationship .

Approaches:-

Unary one-to-many (1:N) relationships: A foreign key attribute is added within the same relation that references the primary key values (this foreign key must have the same domain as the primary key)

A recursive foreign key is a foreign key in a relation that references the primary key values of that same relation

The following Fig. shows a unary one-to-many relationship ‘Manages’ that associates each employee with another employee who is their manager. Each employee has exactly one manager, and a given employee may manage zero to many employees

Unary many-to-many (M:N) relationships:- Here two relations are created, one to represent the entity type in the relationship and another representing the M:N relationship itself

The primary key of the associative relation consists of two attributes, both taking their values from the primary key of the other relation

Any non-key attribute of the relationship is included in the associative relation

The following Fig. illustrates this:-

Here a bill-of-materials relationship among items that are assembled from other items or components is shown.

The relationship ‘Contains’ is M:N since a given item can contain numerous component items, and conversely an item can be used as a component in numerous other items

Add a comment
Know the answer?
Add Answer to:
Explain how a unary relationship can be described as one-to-one, one-to-many, and many-to-many if there is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT