I have several tables and many of them has a “status”, “measure_unit” and the like columns in them.
There’re 2 approaches to work with columns such as “status”.
Create separate tables “statuses”, “measure_units” in database and reference to them from the main tables via a foreign key. Either by string/slug or by id. That is, these “statuses”, “measure_units” tables are ones with at most 10 records in them and they will be rarely modified.
Create enums/structs “statuses”, “measure_units” on a client.
They both have their up- and downsides.
Which is more and better in different ways approach?