Supercode, main code, candidate code

  • 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.
Published 161 original articles · Like 68 · Visitors 20,000+

Guess you like

Origin blog.csdn.net/qq_43179428/article/details/105505194