On Saturday 22 June 2002 14:06, Shlomi Fish wrote: > On Sat, 22 Jun 2002, Amir Hardon wrote: > > Hello all, > > I'm writing a set of CGI programs that generate's a home site according > > to some data (The idea is to make the creation of a homepage very > > simple... just enter some texts choose colors and you have your site). > > > > I don't know what will be the best way to store this data, my options are > > using an SQL server, or just storing the data on a file. > > > > What should be my considerations? > > First of all, a homepage as the web-server is aware of is a set of static > (or auto-generated) files found under a directory of the machine. I hope > you know that.
Why can't a home page be http://foo.bar/a.cgi?page=myhomepage ? In this case many homepages are being accessed from the same file... > > Now, the questions whether to store in a file or in an SQL database should > have several considerations: > > 1. Do you require processing the entire data for every invocation of one > of the CGI scripts, or is it possible that the script will only need a > small subset of the data? > > If the latter is the case, then a properly managed database of some sort > (not necessarily an SQL one) would be a better choice.[1] > > 2. How much do you care about security? Working with an SQL database is > generally more secure than working directly with the filesystem. I don't > mean that the latter is inherently non-secure, it's just that it requires > more care to get right. (e.g: '../../../../../etc/passwd') > > 3. How much do you care about performance? An SQL database has a lot of > overhead, and working with a non-SQL one, or directly with data files, > can be faster by a few good factors. > The script requires some of the data each time it is executed security is always important... and as long as the server keeps running I don't care about performance but I expect many visits... If not SQL so what database do you recommend? > Regards, > > Shlomi Fish > > [1] - There's a very illustrative article about why this is the case here: > > http://www.joelonsoftware.com/articles/fog0000000319.html > > > Thanks, > > -Amir. > > > > ================================================================= > > To unsubscribe, send mail to [EMAIL PROTECTED] with > > the word "unsubscribe" in the message body, e.g., run the command > > echo unsubscribe | mail [EMAIL PROTECTED] > > ---------------------------------------------------------------------- > Shlomi Fish [EMAIL PROTECTED] > Home Page: http://t2.technion.ac.il/~shlomif/ > Home E-mail: [EMAIL PROTECTED] > > "Let's suppose you have a table with 2^n cups..." > "Wait a second - is n a natural number?" Thanks, -Amir. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]