Are Determinants and Candidate Keys same or different things?

Aparan picture Aparan · May 23, 2013 · Viewed 26.6k times · Source

Here I found this:

Definition: A determinant in a database table is any attribute that you can use to determine the values assigned to other attribute(s) in the same row.

Examples: Consider a table with the attributes employee_id, first_name, last_name and date_of_birth. In this case, the field employee_id determines the remaining three fields. The name fields do not determine the employee_id because the firm may have more than one employee with the same first and/or last name. Similarly, the DOB field does not determine the employee_id or the name fields because more than one employee may share the same birthday.

Isn't the definition applicable for candidate keys too?

Answer

Ross Presser picture Ross Presser · May 23, 2013

From my understanding, a determinant may not be a candidate key if the table is not fully normalized. In fact, the word determinant is used when describing the process of taking non-normal data to a more useful, normalized form.

Consider this (obviously non-normal) table:

CREATE TABLE US_Address (
  AddressID int,
  Streetline varchar(80),
  City varchar(80),
  State char(2),
  ZIP char(5),
  StateName varchar(80),
  StateTax DECIMAL(5,2)
)

State is a determinant for StateName and StateTax, but it is not a candidate key for the row. Proper normalization, would therefore move StateName and StateTax out of the US_Address table and into a States table.

See here for more information.