edited by
610 views
5 votes
5 votes

Consider a $1:n$ 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 only $1$ relation
  2. If participation of "one-end" is mandatory then we need only $2$ relations
  3. If participation of "one-end" is optional then we need only $2$ relations
  4. If participation of both the entities are optional then we need $3$ relations
edited by

2 Answers

5 votes
5 votes
While converting from ER diagram to Relational Model, we need to be certain that if we store an identifier for one entity in a relation representing another entity, that the identifier never has a null value. Also, we should not introduce any redundancies.

If both the entities participate fully, we need two relations as one entity relates to multiple other entities. Here, we will have $2$ relations for both the entities and the relation for the entity at the "one end" will have the key of the entity at the "many-end" (we cannot have the key of the entity at one-end to the relation for the entity at many-end as this will cause multi-valued attributes since one entity in many side maps to multiple entries on the one-side).

If participation of "many-end" is mandatory/ we can just use the above $2$ relations and we won't have any NULL values.

If the participation of "many-end" is optional, the above construction fails due to NULLs and we need to have $3$ relations, one each for the $2$ entities and another for the relationship having the keys of the $2$ entities.

If participation of both the entities are optional, then also we need $3$ relations.

Now, both options B and C do not enforce that many-end is “mandatory”. So, both will require $3$ relations.

So, only option D is correct.
edited by
3 votes
3 votes

As nothing is mentioned in question about null or redudancy by default we will follow 1 Nf.

Many to one :

  1. Both side optional : 2 table.
  2. Many side optional and other side total : 1 table.
  3. One side partial and many side total : 2 table.
  4. Both side total : 1 table.so only option A nd C are correct
Answer:

Related questions