Is there a difference between Surrogate key, Synthetic Key, and Artificial Key?

社会主义新天地 提交于 2019-12-04 08:16:12

问题


Are there any differences among a Surrogate Key, Synthetic Key, and an Artificial Key?

I'm not clear on the exact difference.


回答1:


Surrogate key, synthetic key and artificial key are synonyms. Technical key is another one. They all mean "primary key which doesn't have a business meaning". They are distinct from natural or business keys which have a meaning beyond the system at hand.

For instance, consider the SO user account. We are identified by two keys. The natural key is the identifier we use to login in to this site, such as our OpenID name. But because these things are long unwieldy strings (and because SO allows us a choice of different login options) the database identifies us by a User ID which is a generated number. That UserID is a synthetic/surrogate/artifical key.



来源:https://stackoverflow.com/questions/13225928/is-there-a-difference-between-surrogate-key-synthetic-key-and-artificial-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!