How to design table with primary key and multivalued attribute?
<p>I'm interested in database design and now reading the corresponding literature.
Through the book, i have faced a strange example that makes me feel uncertain.
There is a relation</p>

<p><a href="https://i.stack.imgur.com/zIHNs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zIHNs.png" alt="enter image description here"></a></p>

<p>In this table we have a composite primary key (StudentID, Activity). But ActivityFee is partially dependent on the key of the table (Activity -> ActivityFee), so the author suggests to divide this relation into two other relations:</p>

<p><a href="https://i.stack.imgur.com/KON3f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KON3f.png" alt="enter image description here"></a></p>

<p>Now if we take a look at the STUDENT_ACTIVITY, Activity becomes a foreign key and relation still has a composite primary key.</p>

<p>We've got the table in which the whole columns defines a composite primary key, is it OK? </p>

<p>If it is not, what should we do in this case? (probably define a surrogate key?)</p>

<p>What is a good way to deal with multivalued attribute (Activity in our case) in order eliminate possible data anomalies?</p>