0

Between two entities is a 1 to many relationship but this relationship has an attribute of its own. When converting these entities to a relational schema what will happen to this attribute? Does it get joined into the entity on the many side of the relationship like a foreign key does? I don't think it should be another separate relation because that is like saying it's an associative entity which it's not.

Any help is greatly appreciated.

Luna
  • 1
  • 3
  • If a "relationship" has an attribute of its own, doesn't it immediately make it an associative entity? Attributes are attributes of an entity, so... – Juha K Nov 15 '16 at 06:08
  • But the relationship is a 1 to many not a many to many hence making it an associative entity would be incorrect wouldn't it? – Luna Nov 15 '16 at 06:33
  • I don't know if it's "technically incorrect", but I for one would certainly do so! I want my attributes to stay where they actually belong. If it means adding one not-entirely-necessary associative entity, I consider that a worthy trade-off. Someone else might decide differently, though. – Juha K Nov 15 '16 at 08:07

2 Answers2

0

In ER as described by Chen, each entity relation and each relationship relation would map to a separate table (except weak entities/identifying relationships). However, one-to-one and one-to-many relationships commonly get denormalized to reduce the number of tables. In this case, attributes of the relationship become attributes of the determining entity.

Associative entities occur when a relationship is the subject of a relationship. Recording a relationship in a separate table doesn't make it an associative entity. Nor do attributes make a relationship into an entity. Attributes on relationships are quite normal in the ER model.

reaanb
  • 9,806
  • 2
  • 23
  • 37
0

AFAIK yes, that attribute will become a column in the many side table.

And about the associative entity, it is used as the intermediary join table in a many-to-many relation (maybe with other attributes) or when you need to involve a relationship into another relationship (see this answer).

Rooz
  • 21
  • 3