I work on small to medium, database driven, line of business applications. What I usually find, especially in older systems, is most of the data lives in the database. By data I mean stuff like a CountryTable, a ZipCodeTable, lots of/one big table for dropdowns.
Recently I inherited a project in which the client has a complicated nested hierarchical data structure of modules, categories, submodules, settings, configurations etc. But the data is completely static. We just need it so we can ... put everything where it belongs. There are now like 7 complicated ef core entities with relationships. The former team and the client made up an entire mini markup language and wrote a parser for it.
This is static(ish), essential data. It is used to describe the system.
If somewhere in my system, something has a priority level, I need to describe that somewhere. I need to say "low, medium and high exist". The applications I'm used to seeing, do that in the database.
In general I am drifting more and more away from a focus on the database. I would simply define it in code. Why have a PriorityEntity and a PrioritiesTable which needs to get seeded to only ever end up saying "please give me a list of all the priorities"? I want to just define the list in code.
For more complex static data (like my modules) you're probably gonna end up with additional types and mapping code, because of the object relational mismatch.
"But what if it does change? U never know, zip codes vanish all the time"
People have little problem describing something like their menu structure in either markup or in code. If there is need for change a developer can just adjust the code and push an update.
I'm arguing with myself, but I actually do have a question. Are there any reasons against it I'm not thinking of? Is there a name for what I describe? I feel like there should be.