I’m currently designing a database for a project. Now I’m debating with myself whether I have to create a look-up table for example ‘civil status’ data which can only contain fixed values like Single, Married, Separated, Widow/Widower. I’m pretty sure that no other values will be added in the future. Should I put these on a separate table or just hardcode the values on the program code?
I’m currently designing a database for a project. Now I’m debating with myself whether
Share
What’s the benefit of hard coding them? Given a modern ORM system, isn’t it really easy to read these values out of the DB and use them? If so, then I’m not seeing the benefits of hard-coding when the cons are:
‘I can’t think that they’re going to change’ is almost never the same as ‘They can’t change’. If they can’t change, as in True/False, then fine. If you don’t think they’ll change, not so much.