When Should You Create a Database Driven Web Site?

Databases Provide Power and Flexibility for Many Types of Web Sites

Database sending data
Image courtesy Stock.xchng

You may have read articles similar to my 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 or what the advantages of doing so may be. 

The Advantages of a Database Drive Website

Content that is stored in a database and delivered to Web pages (as opposed to that content being hard coded into the HTML of each individual page) allow for greater flexibility on a site.

Because the content is stored in a central location (the database), any change to that content is reflected on every page that uses the content. This means that you can more easily manage a site because a single change could affect hundreds of pages, instead of you needing to manually edit each of those pages.

What Type of Information is Suitable for a Database?

In some ways, any information that is delivered on a Web page would be suitable for a database, but there are some things that are better suited than others:

  • content that needs to appear in multiple places on a site - like press releases or blog articles
  • address and phone lists
  • product inventories
  • 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 and only need that information on a single page, then a static page will certainly be the easiest way to to display it.

If, however, you have a large amount of information or if you want to display the same information in multiple places, a database makes it much easier to manage that site over time.

Take this Site, for Example.

The Web Design site on About.com 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 and I knew that as the site grew even larger, this challenge would become ever greater. To address this issue, I spent a weekend putting all the information into a simple Access database that could deliver it to the site's pages.

What does this do for me?

  1. It's faster to add new links
    When I create the pages, I just fill out a form to add new links.
  2. 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.
  3. 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, preferably a CMS or Content Management System.

 

A Note on CMS (Content Management System) Platforms

Today, many Web sites are built on CMS platforms like WordPress, Drupal, Joomla, or ExpressionEngine. These platforms all use a database to store and deliver elements on Web sites. A CMS can allow you to take advantage of the benefits of having a database driven site without needing to struggle trying to establish database access on a site yourself. CMS platforms already include this connection, making the automation of content across various pages easy.

Edited by Jeremy Girard

Format
mla apa chicago
Your Citation
Kyrnin, Jennifer. "When Should You Create a Database Driven Web Site?" ThoughtCo, Jun. 19, 2017, thoughtco.com/when-to-build-database-driven-site-3464259. Kyrnin, Jennifer. (2017, June 19). When Should You Create a Database Driven Web Site? Retrieved from https://www.thoughtco.com/when-to-build-database-driven-site-3464259 Kyrnin, Jennifer. "When Should You Create a Database Driven Web Site?" ThoughtCo. https://www.thoughtco.com/when-to-build-database-driven-site-3464259 (accessed October 22, 2017).