You may have read articles similar to my Data Driven Web Pages and Beyond CGI to ColdFusion which explain how to set up Web sites with database access, but often the articles don't go into detail as to why you might want to set up a database driven site.
What type of information is suitable for a database?
In some ways, any information store would be suitable for a database, but there are some things that are better suited than others:
- address and phone lists
- product inventories
- lists of information
- price lists
All of these types of information can be displayed on a static Web site, and if you have a small amount of information, a static page can be the easiest way to to display it. But if you have a large amount of information, or you want to display the same elements in multiple places, a database makes it much easier.
Take my site, for example.
The Web Design site on About has a large number of links to external pages. The links are divided into different categories, but some of the links are appropriate in multiple categories. When I started building the site, I was putting these link pages up manually, but when I got to nearly 1000 links it got more and more difficult to maintain the site. So, I spent a weekend and put all the information into a simple Access database.
What does this do for me?
- It's faster to add new links
When I create the pages, I just fill out a form to add new links.
- It's easier to maintain the links
The pages are built by ColdFusion and include the "new" image with the date embedded in the database when that image will be removed.
- I don't have to write the HTML
While I write HTML all the time, it's faster if the machine does it for me. This gives me the time to write other things.
What are the drawbacks?
The primary drawback is that my Web site itself does not have database access. Thus, the pages are not dynamically generated. What this means is that if I add new links to a page, you won't see them until I generate the page and upload it to the site. However, none of this would be true, if it were a fully integrated Web-database system.