News for hackers. Stuff that matters.
Re:The problem with invariants is that they change over time by bruce511 on Tuesday April 23, 2024 @03:17PM (#40136011)
It's less about literature, and more about experience.

Over the years just about every natural key I've seen ends up being either not-universal (-everyone- has a phone number right? Even that new-born baby?) Or not unique (phone numbers can be shared) or mutable (like people's names changing).

It's just so much easier to add a column and use a surrogate key. I prefer uuids because they are unique And immutable - properties I really appreciate in primary keys.

Re:The problem with invariants is that they change over time by abraae on Tuesday April 23, 2024 @04:52PM (#40137115)
It's an easy challenge. Just ask someone to name a natural key that will never change. They are as rare as rocking horse shit.