Databases for Web Sites

Nina Macdonald & Melinda Choudhary, Pixelloom

When you go to the Amazon web site, every page is generated from a database based on who you are or what you searched for. This use of a database to ease searching for the right product is certainly one main use of databases for web sites.  But there are many others as well.

Entering data into a database through a web form is probably the easiest way to add content to a web page. 

For instance, you might put in a database

  • data for a list of courses or talks your company is offering
  • the content of news stories
  • pictures 

The software that generated your web page would then be able to show the most recent news first, omit talks after they’ve occurred, or display only one of the pictures, choosing randomly which one to display each time the page was loaded.

You might want to store data about customers in a database. Simplify your work by letting them fill it out the first time, and if the information includes a password, you can allow them to update the information later themselves.

You might want to provide a form where your sales people can enter information about sales immediately, no matter where they are. By placing such information on the internet, you make it accessible to employees at any time.  Of course, you would want to protect the pages with passwords or even more involved schemes.

To use databases on web sites, you need two kinds of software: database software and a programming language that can be programmed to write web pages with information out of the database or to store information entered on a web page into a database.  There are a number of common language pairs: Microsoft SQL Server and Active Server Pages (ASP), mySQL and PHP, and even Microsoft Access, which can generate web pages by itself.  In addition, there are some free solutions such as baseportal at

Adding a database to the web site architecture not only increases productivity, it also makes frequent updating efficient. For web sites that require daily updates or companies that have high personnel turn around, it is great way to ensure the integrity of the site content.

Adding a database to a web site does cost more at the beginning. However, if an online presence is important or your company operates in more than one location, you will find that the somewhat higher startup cost for a database-driven web site is a good investment in the long run.