Skip navigation.

Your Online Presence > Managing Content

Database driven websites - an introduction

By Andrew Gianni, TechSoup

Synergy between advanced technologies has always been important. Fusion of websites and database technology is a powerful example of this. Voluntary organisations need to update content easily and users need simple access to massive quantities of information. The trick is database driven Web sites. This article in collaboration with TechSoup explains the basics of database driven websites.

Introduction

While it's no simple task, developing a basic website made up of pages of text and images is usually a job that can be taken on by the staff of a voluntary sector organisation, hopefully with a little help from a professional designer who can aid in the development of the site's look and feel. Implementing advanced features on your site, however, will most likely require a level of expertise that doesn't make sense for your organisation to internalise.

Database-driven refers to a website where pages are not pre-existing, separate files. On a database-driven site, a web page is put together drawing on different fields in a database. Since the pages are generated again each time the user clicks on the link to go to them, a database-driven site is dynamic as opposed to static.

Very large sites and sites which change frequently are best managed if they run off of a database. A database-driven site requires extensive programming by a web developer.

The goal of this article is to explain the benefits of database-driven web pages as well as the possibilities and vocabulary involved to help you make informed decisions.

The Web without databases

A basic Web site is no more than a collection of text files that can be edited in a program as simple as Notepad in Windows or SimpleText in MacOS, along with a number of image files, which can be embedded in those pages.

The pages are written in a language called HTML (Hyper Text Mark up Language), which describes the way the content should be displayed in a web browser (software for viewing web pages). There are a number of tools out there (Adobe's GoLive, Macromedia's Dreamweaver and Microsoft's FrontPage to name a few) that aid in the process of laying out these pages and allow you to use a graphical interface to format your pages rather than directly typing in the HTML code. In many cases, a series of static pages developed in this manner will suffice to deliver your message on the Web.

If, however, you are ready to take the next step and deliver dynamic content on the Web, you'll most likely need a more sophisticated site.

The basics of database-driven Web pages

Using a database in conjunction with your web pages allows you to deliver text, images and other web content based on specific requests for information from people viewing your site. So rather than static pages which always deliver the same information - a list of all your staff members, for example - you can offer dynamically generated pages which could better serve your site's visitors - such as a searchable staff member database.

Probably the most recognised type of database-driven website is the search engine. You enter some text into a box, click a button and you are presented with a list of options that are hopefully what you are looking for. This page is generated dynamically based on the request you made and, most likely, the information is stored in a database.

The process is actually much like searching in your organisation's membership database (you've got one of those, right?) for individuals in a particular region, or donors who have given more than a certain amount in the past. In this case, though, you are using a Web interface for a database, rather than the standard interface you would use if the database was running on your computer. For example, it would be possible for you to run a database on your computer to track shipments. It could contain information on items shipped, who they were shipped to, when and how they were shipped, and what their shipping status is (backordered, in transit, delivered etc.). You might run this database on Microsoft Access on your computer, and it may serve you well, but you could also consider making the database accessible on the Web to let your customers look at information on their shipments at any time, as many large shipping companies do.

To process the words entered into a search engine or any data passed to a dynamic web page - perhaps a tracking number entered into a shipping website - a program must be written (often called a script) to generate your results. There are a number of different programming languages used for that purpose.

Three languages that are commonly used for interacting with databases on the Web are ColdFusion (a proprietary solution developed by Macromedia), Active Server Pages (also called ASP - a proprietary language developed by Microsoft) and PHP (an open source solution not "owned" by any company).

There are also a number of other languages that may work equally well for different situations including Perl, Python amd Ruby. The decision as to which of these languages should be used for a particular application should be left to the individual who is developing this functionality, but if you are considering developing database driven content for your site, you need to be aware that web hosting companies won't necessarily offer all these options or may charge more for some of them.

There are also a number of options for databases to store the information that will make up your dynamic pages. Some web hosting companies will allow you to use a Microsoft Access database to run your site or Microsoft's advanced database known as SQL Server.

Another commonly available database for web development is MySQL which is a free database that runs on a number of different operating systems, unlike Access and SQL Server which are limited to running with web servers which use the Windows operating system.

Much like the programming language used to develop your functionality, the decision as to which database to use should be made by a developer and may be informed by what's available from your web hosting company, or may require you to consider changing web hosts.

What's possible?

Querying a database that sits behind a search engine is merely the tip of the iceberg when it comes to using a database to provide dynamic content for your website visitors. What follows are some examples of what can be done by employing a database to drive a website.

Directories

Much like a search engine, you can provide a directory of contacts or events on the Web that can be searched in a number of ways. The data is stored in a database and can be searched through a Web interface. ONE/Northwest maintains a directory of organisations and individuals in the Pacific Northwest conservation community.

Libraries

If you have a large number of documents that you want to make available to the public on the Web, you might consider developing a database-driven library of these documents that would allow people to search for certain documents or browse lists of categorised documents. For example, the Trade Observatory maintains a library of documents relating to the World Trade Organisation.

Surveys

Aggregating data from surveys can be a valuable way for you to evaluate programs or collect information from your members or people who care about your work. Sending out paper surveys and doing the data entry to analyse your results can be frustrating and time consuming, so using the Web to collect that information, assuming a reasonable percentage of those you hope to reach have Internet access, is a great way to simplify the process.

Survey information can be entered into a Web form and stored in a database to be downloaded when the time comes to review the results. Rather than reinvent the wheel and develop this functionality yourself, you might consider using an existing survey tool on the Web such as Survey Monkey or Zoomerang.

Content management

If your Web site contains a large number of pages or you have a number of different people involved in updating and maintaining your site, you may consider using a content management system to maintain a consistent look and feel for all your pages, manage all the content, and provide an easy interface to update your pages. Rather than developing a number of static Web pages, you develop the content and plug it into a template for your Web site. The information is stored in a database.

At ONE/Northwest, we use a content management system for our Web site. As you browse the site, you'll notice that all of the URLs actually end with the same file name (page.cfm) followed by some additional text. This text tells the database which page should be displayed.

Portals

In the past four years we've been inundated with Web sites beginning with the word my: MyYahoo, My Excite, My Techsoup. These sites are commonly known as Web portals, and their purpose is to give visitors the ability to customise the content they see and how it is displayed.

If you produce a lot of new content regularly, a portal model may be a great way to serve the needs of a number of diverse audiences.

Internal databases

All of the above examples concern public websites, but you could also consider using the Web to store an internal database that you can share with staff members or collaborators across a diverse geography. There are a number of services available, and a good place to start looking at your options is Yahoo's list of online database services.

What does this all mean to you?

There are clearly many ways in which you can augment your Web site through the use of a database.

Probably the best way to start thinking about which options may work best for your organization is to work with a consultant to discuss the possibilities. Don't try to make technical decisions about how to implement certain features. Rather, start by deciding what you want your Web site do and have a consultant help you decide on the technology to make it work.

You'll notice that most of the examples deal with different ways of sharing information, so start by looking at the information you have to share, or could develop. Then think about the people you want to share it with and how they'd like to access that information.

As with technology in general, always start by thinking about what it is you want to accomplish and let the Web be a means to an end, not an end in and of itself.

For more information see the following articles on the Knowledgebase


About the author

Andrew Gianni, TechSoup

Glossary

Browser, Database, Hosting, HTML, Internet, MySQL, Operating System, PHP, Search Engine, Software, SQL, Web Browser, Web Page, Web Site, Website

Published: 8th April 2002 Reviewed: 24th April 2006

Copyright © 2002 Compumentor

Article published in collaboration with Techsoup.

 

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.

User comments and discussion

If you have useful information to add to this article please Add a comment. Comments will appear after they have been moderated.

Discuss this topic in the Knowledgebase forums. This is a useful place to share knowledge, experiences, and ask questions.

Please sign in or register to be able to post a comment or discussion.