Previously, settings for deployments of an ASP.NET application were stored in multiple configuration files under the Web.config config sections using a KEY/VALUE format. We are moving these 'site module options' to the database for a variety of reasons.
Here are the two options we are mulling over at the moment:
1. A single table with the applicationId, moduleId, and key as a Primary Key with a Value field.
Pros:
- This mimics the file access.
- It is easy to select entire sections to cache in hashtables/value objects.
Cons:
- More difficult to update since each key needs to be updated individually.
- Must cast each value if it's not a string.
2. Individual tables for each section which separate stored procedures, classes, etc.
Pros:
- Data is guaranteed to be consistent since the column and object types are typed.
- Updating is done in one trip to the database through an explicit interface.
Cons:
- Must change the application interface to access the
- Must update the objects, database tables, and stored procedures each time something changes.
Do either of these sound like good ideas or is there another way I may have overlooked?