Machine-translated by Google. Questions are authored in English.
Top

Discussion

An ER model of a database consists of entity types P and Q. These are connected by a relationship R, which does not have its own attributes (i.e., no self attributes).

Under which one of the following condition, can the relational table for R be merged with that of P ?

  • A.Relationship R is one-to-many and the participation of P in R is total
  • B.Relationship R is one-to-many and the participation of P in R is partial
  • C.Relationship R is many-to-one and the participation of P in R is total
  • D.Relationship R is many-to-one and the participation of P in R is partial

Answer: C

R can be merged with P when R is many-to-one and the participation of P in R is total.

If R is many-to-one from P to Q, each P entity is related to at most one Q entity. The relationship can then be stored by adding Q's key as a foreign key column in P's table. If P's participation is total, every P row has a value in that column, so no nulls are introduced.

If R is one-to-many from P, a single P entity can relate to many Q entities, which cannot be stored in one row of P; the table would have to merge with Q instead. With partial participation the merged column would hold nulls for P entities outside the relationship.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.