?
Solved

Database or File or Dbm

Posted on 1997-07-10
2
Medium Priority
?
148 Views
Last Modified: 2013-12-25
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?
0
Comment
Question by:fitzroy8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 180 total points
ID: 1829020
The choice of file or DB is a complex one. If you are not going to complex relational queries and a relatively flat file structure will do (which I suspect is the case in your application) then you might choose to use a file based database written in perl.

Another factor is how familiar you are either with a DB or perl.

If you only have a couple of handfulls of servers then, as you say, you could have a single file for each server. You would parse the file with a simple perl program. The file might be something like:-

ServerName,Proteus
Organisation,Accounts
etc,etc

You could easily read this in with a perl program. Modifications would involve reading the file in, modifying the variables and writing it out again. If there is the possibility of conflict between users then the perl 'flock' command should be used.

If you use a DB solution then there are often either automatic locking methods or ones you can call.

0
 

Author Comment

by:fitzroy8
ID: 1829021
Thanks,

I think that I'll just start off with a simple file;


0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question