3 ms·
IDs not round-tripping properly during backup/restore Oracle has a "ROWID pseudocolumn" which uniquely identifies each row. (I know this because I once had to
by michaelt 8y ago
IDs not round-tripping properly during backup/restore
Oracle has a "ROWID pseudocolumn" which uniquely identifies each row.
(I know this because I once had to fix a database table with no primary key, and some rows where every field was identical. The rowid lets you delete one out of two identical rows. So it's not an entirely useless feature)
If you had an inexperienced developer, and no-one reviewing their work, and they heard the rowid is the fastest way of looking up a row - faster even than the primary key - so they decided to use that in URLs, that would be tremendously inconvenient.
- TeMPOraL 8y agoFew days ago I discovered that SQLite has ROWID too; the extra column gets created if your table doesn't have an INTEGER PRIMARY KEY and doesn't declare WITHOUT ROWID. Caveats apply, though. See: https://www.sqlite.org/rowidtable.html https://www.sqlite.org/rowidtable.html.
- Zancarius 8y agoFunny timing. I just discovered the same about 3 days ago, too. I've been a consumer of SQLite databases but never had much of a need to create one. I was somewhat surprised to say the least. Interestingly, it appears AUTOINCREMENT changes ROWID's behavior [1] to stop ID roll over and reuse. Apparently you can't use AUTOINCREMENT on tables using WITHOUT ROWID either. [1] https://www.sqlite.org/autoinc.html https://www.sqlite.org/autoinc.html