edited by
469 views
3 votes
3 votes

Consider a $1:1$ relationship and an ER model using it. Which of the following is/are correct for converting this relationship to a relational instance? (Mark all the appropriate options)

  1. If participation of both the entities are mandatory then we need $2$ relations
  2. If participation of both the entities are mandatory then we need only $1$ relation
  3. If participation of only one of the entity is mandatory then we need $2$ relations
  4. If participation of both the entities are optional then we need $2$ relations
edited by

1 Answer

Best answer
7 votes
7 votes

We need to be certain that if we store an identifier for one entity in a relation representing another entity, the identifier never has a null value.

So, if both the entities participate fully, we just need a single relation representing both.

If one entity participation is optional, we need a separate relation for both the entities with the relation for the mandatory entity having a reference to the relation for the optional one (so that there is no NULL reference). This will be similar to an Employee - Manager relation where every Employer must have a Manager but a Manager may not have any Employee under him.

If participation of both the entities are optional, we need to have three relations - one each for the entities and a separate relation for the relationship having the primary keys of both the entities.

So, here only options B and C are correct.

Reference: MIT notes

selected by
Answer:

Related questions