Hacker News new | ask | show | jobs
by mulmen 2062 days ago
Is there further discussion of the "Alternate Key" somewhere? This is a new term to me. Is it like a candidate key?
2 comments

In general there can be more than one candidate key for a given relation (table). Only one candidate key is "primary", all others are "alternate".
Thanks that makes sense.

Is this an industry term or are you just using it here to emphasize the difference?

I've seen alternate used in other places to refer to candidate keys that are not currently the primary key, though I'm fairly sure it isn't a defined standard term.
Industry term. But it is usually unknown to people who tend to use id as primary key for every table.
Do you mean synthetic keys rather than natural keys?
Yes, it is exactly a candidate key as they describe it - simply another field which uniquely identifies rows in the entity.

EDIT: Agree with panda17, they're using it as "candidate keys which were not chosen as primary key."