Let us say I have an entity House that I want to store on a database. The House has an attribute yearBuild. If the house was build before 1990 its status should be 'ToBeSelled'. Now I have two ways to model this
a) store the status in the database as attribute(metadata) or
b) extract the status on runtime each time I am requesting the House .
So the actual question is : Should I store metadata or create them at runtime ? I really don't like storing them as their maintenance is difficult as you have to handle 'stored states' but on the other hand creating them on runtime may make them more difficult to be comprehensive it terms of code readability mainly . What is the best practice in this scenario ?
In my scenario I might need somewhere else in the code an if check like
if house.status == 'TobeSold'
but still the status can be generating solely from the base entity .
I also don't care too much about performance .