Skip to content

Comment on Identifiers are better off without meaning

Comments

Any semantic meaning in identifiers means all your data is completely denormalized. 1NF specifically requires storing all data as irreducible columns[0]. Most 1NF violations aren't actually all that consequential beyond not being able to do useful JOINs on the data in the column, but doing it in a candidate key column is a bottomless pit of update hazards.

[0] This means no comma-separated lists in strings, JSON columns, serialized PHP objects, and so on.

Right: When making the tradeoff, consider how painful it would be if you ever have to rename. All the way to your users refusing to even pay attention to a change in identifiers they have cached. How complex a translation layer might you have to add? It might be very manageable. It might be just plain dangerous.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.