Alternate key

From Wikipedia, the free encyclopedia

You may have meant the Alt key on the keyboard.

An alternate key (or secondary key) is any candidate key which is not selected to be the primary key (PK).

For example, a relational database with a table "employee" could have attributes like "employee_id", "bank_acct_no", and so on. In this case, both "employee_id" and "bank_acct_no" serve as unique identifiers for a given employee, and could thus arguably be used for a primary key. Hence, both of them are called "candidate keys". If, for example, "bank_acct_no" was chosen as the primary key, "employee_id" would become the alternate key.

Languages