Hey guys. Im designing a web app with rails for storing and analysing college students' marks.

Ive come up with a database design like this:
First

Now IM not sure how to set the associations. Can you please help me? And is the design ok?

use

 has_many :

and

belongs_to :

in the models

Thanks a lot. Ive done it and Ive come a long way now :)