Normally I would say, store the config in a file. Files can be versioned in your SCM and are not considered part of your application data. This is good.
Of course some data which are configured BY the user might be stored in the database. But doing unnecessary queries on data which change rarely may be inefficient.
On another hand, if you're writing a large scale application, placing configuration data in a database enables it to be in sync from any location within your service (say you have a large number of servers of different types).
Local caching of such data etc, might be a useful optimisation, but don't do it unless you need to.
It's a tricky one.
I wrote an application which had two .php configuration files, one which was set up per-application, another per-instance. The difference? If the application is moved to another server, or some other similar data change, the per-instance data change. The per-application configuration data were things which were configurable at the code level but were notionally versioned with much of the rest of the application's code.
So for me it's all about:
- Frequency of change (things which change often may benefit from being in a database)
- Whether it needs to be in synch between different parts of a large application or service
- How you plan to version the configuration data (if at all)
If it's necessary for it to have a particular value for the application to function correctly (e.g. bits of business logic coded into constants or data structures), it is a good idea for it to be in a file which is versioned with the rest of your code base.
I hope this gives some ideas.
Mark