我们的 DBA 说,由于社会保险号 (SSN) 是唯一的,我们应该将其用作表中的主键。
虽然我不同意 DBA 的观点(并且已经提到了 this answer 中发现的一些好的部分),但在某些情况下他可能是正确的吗?
最佳答案
SSN 不是人们的唯一标识符。它是否应该是某个表中的 PK 取决于表中的行的含义。 (另见 sqlvogel's answer。)
6.1 percent of Americans have at least two SSNs associated with their name. More than 100,000 Americans have five or more SSNs associated with their name. [...] More than 15 percent of SSNs are associated with two or more people. More than 140,000 SSNs are associated with five or more people. Significantly, more than 27,000 SSNs are associated with 10 or more people.
--idanalytics.com
另见维基百科 Social Security number .
关于database - 什么时候应该将社会保险号用作数据库主键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45422211/