0

I am learning database management systems now. May I know is it required for a weak entity to have an attribute or have a primary key itself? (ERD)

Next, when transforming many to many (M:N) relationship to 1 to many relationships, the participation constraint mandatory against parent entity is it always the same?(EERD)

Lastly, Why do we have to place attributes on the relationship in M:N ? (ERD)

Masud Jahan
  • 3,418
  • 2
  • 22
  • 35

1 Answers1

0

Question 1

Every entity and relationship in an ER model will have a primary key, weak entities included. Where they differ is in how that key is constructed.

A weak entity's key is composed of another entity's key, plus some additional distinguishing attributes. Some examples:

  • In a movie rental store, each copy of a movie may be identified by the movie's key and a disc number.
  • In a medical aid scheme, each dependent of a member may be identified by the member's key and the depedent's name.
  • In an invoice system, each line item on an invoice may be identified by invoice's key and a line number.

Question 2

I don't understand your question - please try to reword or explain.

Question 3

When you want to describe a relationship, you can add attributes on the relationships. If a relationship is 1:M, then any attributes on the relationship will be attributes of the entity on the 1 side (there's a functional dependency from the entity key to the attribute value). However, attributes on M:N relationships (and also ternary or higher relationships with more than one non-unique role) don't transfer onto any specific entity, since the attribute is dependent on combinations of entities. Thus, the only place you can put those attributes is on the relationship itself.

reaanb
  • 9,806
  • 2
  • 23
  • 37