Can a weak entity set be in a one-to-many relationship with a strong entity set? If yes, then how can this be implemented in relational model? The relation corresponding to the weak entity must have an attribute that refers to the primary key of the relation corresponding to the strong entity set. If (weak : strong) is (1: Many) then this particular attribute becomes multivalued , which is not allowed in relational model. So can a weak entity set be in a one-to-many relationship with a strong entity set?
Asked
Active
Viewed 2,180 times
1
-
If you need a 1:Many relationship, add an intermediary table with two columns (more if either key is compound), one column referencing the weak entity, one referencing the strong, and with a primary key (or unique constraint) on the pair of columns. E.g. if you have `WeakTable(weak_id, …)` and `StrongTable(strong_id, …)`, create an associative table `WeakStrong(weak_id references WeakTable, strong_id references StrongTable, primary key(weak_id, strong_id))`. – Jonathan Leffler Aug 14 '18 at 17:25
-
Hi. This is not clear. What does "attribute becomes multivalued" mean? Referring to an example would help. PS Entities are part of the ER model, not the relational model. But in both, *tables* represent relationships so if you have a relationship between entities then have a table for it. ER design methods have a table for an entity but such tables don't contain attributes that are ids of other entities. To properly answer your question we need to know the design method you are following to address why you are having a problem. – philipxy Aug 14 '18 at 22:26
-
Possible duplicate of [Entity Relationships - Can a weak entity take part in a 'one to many' relationship as the 'one'](https://stackoverflow.com/questions/2464094/entity-relationships-can-a-weak-entity-take-part-in-a-one-to-many-relationsh) See also https://stackoverflow.com/a/42992336/3404097 – philipxy Aug 14 '18 at 22:31