3 ms·
Is there further discussion of the "Alternate Key" somewhere? This is a new term to me. Is it like a candidate key?
by mulmen 6y ago
Is there further discussion of the "Alternate Key" somewhere? This is a new term to me. Is it like a candidate key?
- panda17 6y agoIn general there can be more than one candidate key for a given relation (table). Only one candidate key is "primary", all others are "alternate".
- mulmen 6y agoThanks that makes sense. Is this an industry term or are you just using it here to emphasize the difference?
- dspillett 6y agoI'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.
- panda17 6y agoRegarding the "industry term", search: site:oracle.com "alternate key" site:microsoft.com "alternate key" site:ibm.com "alternate key"
- dspillett 6y ago"defined standard" !== "industry term", though I accept your point that it appears to be more common than I was thinking. IIRC it wasn't introduced to me when learning databases academically which I was assuming to be a standards compliant environment, but that was quite some years ago so I may or may not R C...
- marcos100 6y agoIndustry term. But it is usually unknown to people who tend to use id as primary key for every table.
- mulmen 6y agoDo you mean synthetic keys rather than natural keys?
- kthejoker2 6y agoYes, 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."