I don’t quite know how to ask this question, so I will use it instead of an example:
Imagine that you have an object in the application Country. There are two properties of this object: Nameand collection ' Bordering Countries. Additional properties can be added later, but this will be information that will change very rarely (for example, changes in the names of countries / borders)
Let's say that this application should know about all countries of the world. Where would you save this state of an object? How would you update them? It seems foolish to store all this state in the database, as it will not change very often.
One option may be to have an abstract base object "country" and have a class for each country that inherits from it, with the details of each country. But it seems to me not quite right.
What is the correct way to work with these objects?
UPDATE:
Someone asked about language: C #
In addition, I come to this from the point of view of a web application, so there would be few client installations where I would have to worry about updating hard-coded values.
Most people have suggested not hard-coding data, but using DB or XML files to store data. Can someone provide an example of how this type of object will be "updated" (for example, from an XML file)? Are you using some kind of helper or factory method to get an instance of a specific country?