key
Super key : A key that can uniquely identify a tuple, which may be redundant. For example, (student ID and name) can determine gender, but student ID can determine gender by itself, so there is redundancy.
Candidate key : A key that can uniquely identify a tuple without redundancy. There may be multiple candidate keys. For example, both student ID and ID number can identify a tuple. Both are candidate keys.
Primary key : Select one of the candidate keys, that is, the primary key. For example, student ID and ID number can be used as primary keys.
Foreign key : the primary key of other relationships.
Solve candidate keys
Graphical method