I have a question about fields in databases that can be displayed in different units, but stored only in one, for example, "height", for example.
Where should the "model unit" be indicated ?. Of course, in the documentation, etc. But we all know that no one reads the documentation and that self-documented things are preferable.
From a practical point of view, what do you think of coding in a database field (e.g. height_cm)?
I find it strange at first glance, but I find it practical to avoid mistakes when different people access the database directly and the “block of templates” never changes.
What do you think?
Sincerely.
language-agnostic database coding-style
user15546
source share