Reputation: 408
Suppose you are tasked with writing a web application that must store configuration information in some format. What are the benefits and drawbacks for storing these configuration information in a relational database compared to storing the information in a file? Configuration options may include but not limited to data retention settings and settings for interfacing with external system (e.g. ip address, port, username, password).
Upvotes: 6
Views: 5842
Reputation: 8920
And now a real answer.
I guess in the end it is a matter of taste
Pro:
Con:
Upvotes: 3
Reputation: 3826
Here is a summary of pros and cons
Pros for file:
Cons for file:
Pros for database:
Cons for database:
This comes down to personal preference and any current or possible future requirements for providing easy configuration.
Upvotes: 3
Reputation: 118744
Because then all you have to do is have your connection pool properly configured (which you should have to do anyway), and then you know where all of your settings are located. Plus they can be updated at runtime, they be updated with the app up or down, and they can't be stomped on with when the application is deployed.
All sorts of good reasons.
Upvotes: 1