阅读背景:

每个表真的需要一个自动递增的人工主键吗?

来源:互联网 

Almost every table in every database I've seen in my 7 years of development experience has an auto-incrementing primary key. Why is this? If I have a table of U.S. states where each state where each state must have a unique name, what's the use of an auto-incrementing primary key? Why not just use the state name as the primary key? Seems to me like an excuse to allow duplicates disguised as unique rows.Almost every table in every database I've seen




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: