PLEASE note: These pages are here solely for historic purposes. New articles have not been written since 2001; many links in the index are broken; and most ahref.com email addresses will now bounce. Try visiting ep Productions, Incorporated, the web programming and development company behind this site.

Tip: Looking for industry conferences? Try the conference calendar.

web index ahref.com: a community space for web developers------ -----
IndexToolsCareersTalk
ahref.com > Guides > Technology

Technology Guide

Web Databases, Continued

When wouldn't you use a database?

Databases can make information management a lot easier, but just because you can use a database to solve a problem doesn't mean you should.

Here's an example of an application which might seem worth using a database for, but really doesn't need one. Each time you load a web page on Anchor, you get a random message at the top of the page. We could put these messages into a database, and set up a system for administrators to add, delete, and modify the messages through a web interface. But the messages are few enough (12) and change infrequently enough (unchanged in the past month) that it is easier to just use a server-side script to assign them to an array, and randomly choose one element of the array to display each time someone loads one of our pages.

Another example where a completely dynamic, database-driven solution would be inappropriate would be on Yahoo's index of web sites. It makes sense for them to use a DBMS to manage their index of web sites, and to allow users to search the index. But rather than use fully dynamic, database-connected pages as a browsing interface for users, they export the information from their database to static pages (an approach that we'll use for our Index as it grows). If they performed queries to their site database each time users browsed their pages, the load on their machines would increase immensely. The resources required to make multiple database queries far exceed the resources used in serving a mostly static web page.

If you want to make and distribute a web application that might be used by people who don't or can't run DBMSs for some reason, storing your information in text files might be a good idea. NetForum is a web-based discussion forum that stores messages and configuration information in plain old text files. Because of this, the people who use the program need not take the trouble of installing, running, and administering a DBMS. This makes NetForum easier to install and use, though it also makes it harder for someone not familiar with the nuts and bolts of the program to alter it.

Finally, the more complicated you make a software system, the greater the chance that it will fail at some point. Using a DBMS as part of a web application gives you one extra component to worry about, one more thing that just might go wrong. If you're dealing with large sets of information and need a standardized way of dealing with the data, a database can definitely help. But if a system is small enough and the information is manageable through some other means, you may want to explore other options.

Edward Piou is an Anchor producer and runs ep Productions, a development company based in the Washington, D.C. area.

<<< to technology guide
or jump to a topic:

Introduction
What is a database, anyway?
How is a database structured?
So how does it work on the Web?
When wouldn't you use a database?


view a printable version of this article


To suggest a topic, please email guides@ahref.com.

 


HOME ||| ABOUT AHREF.COM ||| ADVERTISE ||| FEEDBACK ||| SEARCH THIS SITE ||| CONTRIBUTE

© 1998-1999 ep Productions, Inc. All rights reserved. Terms of use.