by randomdata · 2y ago · 0 comments
Surely SSN is a surrogate key? They are not naturally derived. The early ones were serial (i.e. an auto-incrementing field) and more recent ones are randomly generated (i.e. a UUID).
SSNs are created within the organization. Maybe not within your organization, but nobody is talking about you. They are a surrogate key.
If you use data as a key, then that is a natural key, if you invent a value to use as an identifier, that is an artificial or surrogate key.
If an API provides you an ID for a record, that is data. If you use it as a key, that is also a natural key in your system.
It may not be your surrogate key, but it is someone's!