When should a social security number be used as a database primary key?

前端 未结 3 1220
情深已故
情深已故 2021-01-15 08:24

Our DBA says that because the social security number (SSN) is unique, that we should use it as the primary key in a table.

While I do not agree with the DBA (and hav

3条回答
  •  旧时难觅i
    2021-01-15 09:00

    SSN is not a unique identifier for people. Whether it should be the PK in some table depends on what the rows in the table mean. (See also 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

    See also Wikipedia Social Security number.

提交回复
热议问题