<p>I have an enumeration of delivery status codes.  And when I save delivery data to the database they are stored with a foreign key to a table containing the same data (i.e. the same delivery codes)</p>

<p>What is the best strategy for keeping an enumeration in synch with data in a database?</p>

<p>Do you just remember to add to the enumeration when a new code is added to the database?</p>

<p>Or load the data into a dictionary when the application starts? And use the dictionary instead of an enumeration? Though this means that I don't have a strongly typed representation of the data - which I definitely want.</p>

<p>Or something else?</p>

<p>The data is not very volatile but new codes do get added once every blue moon</p>

<p>Would appreciate any suggestions.</p>

<p>thanks</p>

When I use a enumeration in the code, I usually store the formatted name as a varchar in the database rather than keep a table of the enumeration values in the database.  I realize that  this is not as normalized as one might like, but I believe it is better than trying to keep the database and my enumeration synched.  All that is needed is to format on insert/update and parse on select to reconstitute the value back into the enumeration.
I only do this when I believe that the enumeration is going to be fixed -- although, I too have made infrequent updates.  If I believe that it is likely that the data will be regularly updated, I won't use an enumeration and will have a separate table in the database with foreign key references.