News for hackers. Stuff that matters.
Re:You'll regret using natural keys by phkahler on Wednesday June 05, 2024 @09:46AM (#40584685)
Something like that should have a built in check "digit" if people are going to see it and possibly type it in.

For numeric values, making them all a multiple of 11 is a simple way to catch all single digit errors or single transpositions.

Re:You'll regret using natural keys by chuckadams on Wednesday June 05, 2024 @10:22AM (#40585130)
That's why VINs make a decent natural key, because they do have a check digit. Plus they're not opaque: if you look up the VIN and the make/model/year is completely different than the car in front of you, you know you either have the wrong VIN or the wrong car.