4 ms·
Who doesn't have an auto increment Id field on every table? Ok I know its not a 100% perfect solution for a user id. The other gotcha is using ss on ni numbers
by C1sc0cat 6y ago
Who doesn't have an auto increment Id field on every table? Ok I know its not a 100% perfect solution for a user id.
The other gotcha is using ss on ni numbers as identifiers
- taffer 6y agoWhat is "ss on ni"?
- Jtsummers 6y agoProbably "session".
- marcosdumay 6y agoI read that as "social security number or national identity", the "on" being a typo.
- brlewis 6y ago> Who doesn't have an auto increment Id field on every table? In large organizations with a lot of teams, natural primary keys make interoperability easier across databases, as opposed to a forest of artificial keys that are all different. SQL experts who advocate natural keys point to ON UPDATE CASCADE as the solution to natural keys that occasionally change. So the absence of an auto increment Id field might be a dumb error, or might be super smart, or might be both. Both means you're a SQL expert but haven't made sure everybody else working on the project always will be.
- BlueTemplar 6y agoI've seen a situation where old IDs were re-used for new users, like we were about to run out of numbers or something… XD And with former users coming back, of course expecting to have their IDs back too ! This being on a paper-first (often paper-only) database, with no locking process, where we also had the issue of new users being added at the same time, for the same ID. If only I already had been through a database course at the time…
- C1sc0cat 6y agoI meant the internal auto increment id field - not the actual user id. I think I just proved my point here.
- abraae 6y ago> Who doesn't have an auto increment Id field on every table? Anyone who exposes their id fields, e.g via APIs, and doesn't want other people gaining insights into their volumes by watching the rate of increase in id values.
- thom 6y agoAnyone who generates IDs outside of the database. Anyone who wants to avoid contention on sequential IDs.