News for hackers. Stuff that matters.
Re:GUIDs Are Not the Only Answer by BillinghamJ on Tuesday January 05, 2021 @08:25PM (#25653703)
Isn't the obvious difficulty here that such natural keys tend to change? Eg names and boundaries of cities & countries change - relatively - all the time. You don't want your IDs to be changing alongside
Re:GUIDs Are Not the Only Answer by mamcx on Wednesday January 06, 2021 @10:06AM (#25658354)
Why not?

I work for ERP/eCommerce, so this issue happens. But for real, I need to store historical facts anyway ie: In a invoice/order I must store the ship info at the time of the transaction.

A artificial ID is useless in a lot of cases where "and if the key change, what?" because if that is an issue, is mostly because the data must retain history, and then, you need to store that anyway.

For that, I log the data in a history/log table.