A key is a field or set of fields that uniquely identifies each record in a table. A candidate key is a field or set of fields that could serve as the primary key. The primary key is the candidate key that is chosen to uniquely identify each record. When no single field can uniquely identify records, a compound key that combines multiple fields can be used. A surrogate key is a unique identifier created specifically to identify records when the natural candidate keys do not adequately distinguish between records. Foreign keys are used to link records between tables based on matching primary key values.