Reputation: 29658
Wordpress, for example, has a table with name => value
rows for storing application-wide settings (the name of the blog, comments settings, etc.). Please note that I'm referring to settings that may be modified often during normal use of the application.
I understand why Wordpress does it like that (portability: it's easy to copy the entire database to another blog and retain settings), but is there a better way to do it for smaller applications?
I know that many frameworks, like Zend Framework for example, have a configuration file with application-wide configuration settings. Why not just dynamically modify that file at runtime to save my settings? To me, this has several advantages over database settings storage:
On the other hand, the biggest complication I can think of is that of concurrency. The file will need to be locked while changes are being made.
What is the preferred way?
Upvotes: 1
Views: 139
Reputation: 340723
value
columns of different types used exclusivelyUpvotes: 1