Does anyone have a good system for deciding what to put in the database and what to put in the config file.

My config file is a php array and I have a mysql database.

If for example I have a data set of 5 'rows' that will rarely change (if ever) is it better to keep it in the config file?

I am looking for a rule that I can follow that will help me choose - if anyone has one.

Comments

I think this is a very common question among users who have reached the point that they understand config files and databases and now want to know how they are actually used in practice. Hope you get some good info.

Written by wshato

Accepted Answer

It really depends on the data. The config file is really used for application specific settings, whereas your DB should contain the data that your app will use to serve its purpose.

Written by Evernoob
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki