3 ms·
Why would anyone use a random value as a primary key? I haven’t done databases in a long time but isn’t it standard practice to use a sequential incrementing va
by yalogin 5y ago
Why would anyone use a random value as a primary key? I haven’t done databases in a long time but isn’t it standard practice to use a sequential incrementing value for the primary key?
- tapas73 5y agoreasons are: 1. no need for coordination in distributed system, no need to check what is the next available id. 2. if userid is visible to users, sequential userid gives away information about the amount of users and allows guessing other valid userids.
- yalogin 5y agoThis is exactly over engineering and solving for the wrong problem. It can be solved easily d efficiently in other ways.