entity-relationshipentity-data-model

How do I map M:N relationship whose otherside is a weak entity?


I'm trying to map my ERD to a relational schema; one trouble I ran into is regarding the ENROLLS relationship which is M:N. For M:N in relational diagram, i know a separate table is made with the PKS from both sides. However, my other side is a weak entity.

The table for ENROLLS would then be [Ssn (PK), ? (PK)]. I don't know what to do; do I just put all the partial keys?

ERD for database.


Solution

  • I talked to my professor, and my way of approaching this is correct. So, the final table would look like [Ssn (PK), Year (PK), Semester (PK), Number (PK)].