I have got an issue concerning fields in databases wich are measures that could be displayed in various models but they are saved only in a single, for example "height", for instance.
Where if the "pattern unit" be mentioned?. Obviously, within the documentation, etc... But everyone knows nobody reads the documentation which self-docummented situations are preferrable.
From the practical perspective, exactly what do you think about coding it within the database area (for example height_centimetres for instance)?.
I've found this strange in a start looking, however i think it is practical to prevent any mistakes when differing people cope with the database directly and also the "pattern unit" won't ever change.
What is your opinion?.
What's strange about height_centimetres? Looks good in my experience.
Sometimes the thing is measures and models in 2 separate fields, which is a lot more painful.
As lengthy you may already know the models aren't likely to change, I believe height_centimetres is a great way to cope with it.
Most databases support comments on posts. For instance in Postgres you can set a comment such as this:
COMMENT ON COLUMN my_table.my_column IS 'cm';
Storing the system title by doing this means your database is self-recording. I'd also highly recommend using standard scientific models (i.e. the metric system).
To be sure, no problem with adding the system towards the area title.
The only real factor I'd have to say is to create the naming convention consistent across your database - i.e. not "height_centimetres" and "mm_width"!
Be skeptical about measures that could change like foreign currencies. Oftentimes it's not practical relabel database area when it is measure changes.
It is quite silly to possess a area known as
amount_mk which accustomed to contain money amount in marks but presently really consists of money amount in pounds.