> I need help. I am building a database for a small college that wants to be > able to update their program information for each department through an > web/gui program. > > I've decided to use, MYSQL, Apache, PHP and FreeBSD as the OS. (I built my > web page this way) > > Here's my QUESTION! Because some of the program information is large I don't > want to query the data base everytime do I?
I've got a web site which takes just this approach, but there are pros and cons with it. The upside, is that if most of the information is fixed, then you're swapping database accesses and the overhead of a CGI script for a simple 'GET' request. It clearly works best when the rate of change for the raw data is relatively low, because it implies that you generate the page(s) once but server them up many times. The downside is the delay between entering new data and it being available on the site. In some applications this may be critical. The method that I used is to record a timestamp every time the database is updated, to have a script running permanently in the background looking at this timestamp. If it's greater than zero and more than 5 minutes old, the pages get regenerated and the timestamp is then set to zero again. The reason that I chose this approach is that updates are relatively rare (a dozen or so times a week), but the hit rate on the site is orders of magnitude higher. Also, it gave scalability at lower cost than tuning CGI scripts and the Apache server environment. The underlying point though, is that you need to look at the pattern of both accesses to the site and updates to the database and decide based on that. The site I'm talking about is here : www.pubfun.com if you feel a need to look round. Paul Wilson Chime Communications --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php