- Supercode: is a collection of one or more attributes, these attributes allow us to uniquely identify an entity in an entity set. All collections containing supercodes are also supercodes
- Candidate code: smallest supercode
- Master code: select a candidate code
All codes are a collection.
Example:
Student (student number, ID number, gender, age, name)
Student ID or ID number can uniquely identify a student.
- So (student number), (ID card number) is a super code. Therefore, (student number, gender, age, name) and (ID number, gender) are also super codes
- Candidate codes are (student number) and (ID number)
- The selection of the master code should not be easy to change, so it is more suitable to choose the ID number.