How to make a composite key to be unique?
问题 I am making a database of students in one school.Here is what I have so far: If you don't like reading jump to the "In short" part The problem is that I'm not happy with this design. I want the combination of grade , subgrade and id_class to be unique and to serve as a primary key for the students table. I can remove the student_id and make a composite key from the 3 but I don't want that either. Maybe I should make another table lets say combination_id where grade , subgrade and id_class are