Hacker News new | ask | show | jobs
by hashimotonomora 1581 days ago
In my experience it’s best to work with a surrogate PK and generate a bijective customer-facing natural key.
1 comments

I work mainly with CRUD, and usually people want to search for specific customers, names or similar. While not necessarily bijective on its own (multiple customers, same name, for example), it narrows it down enough for the person to find the record. (Or filtering on multiple fields)

So, I don't really see a need to generate a natural key.