Database or File or Dbm
Posted on 1997-07-10
I am a newbie to CGI progrmming etc. As part of a project I have to create an application to monitor certain server. The settings for the things to be monitored on each server is to be obtained using forms. Now there are at most going to be 10 servers being monitored at a time. I have the following questions:
1. Do I store the data for each server in a file or use a database?
eg for given machine named X there is a file X_config, or a table in a DB with the things to be monitored, obtained from the form, written into the file, DB. Everytime the config is changed( by a number of users) the file, DB has to be updated. The data for each machine is the written to a temp file, from which a crontab is created?
Which is better a file or a DB?
2. Because there is the possibility of a certain number of users being able to add servers to be monitored or modify certain settings for servers, if I were to use a DB do I need to makesure there is a lock in place everytime someone modifies a server?