For example, I have to program an enrolment table which has:
- enrolment_id
- academic_period
- results
- student_id
- subject
I want to enforce to make sure that a student can't enroll in a subject more than once in a specific academic period. So, the constraint shall involve student_id, subject, and academic period columns.
I'm still unsure how do I make this happen. Any help?