Databases on Web Sites

Why use databases on-line?

Some websites make extensive use of databases to store information about their products/services/customers.

Essential Features for an On Line Database

  • Display records - so any user can see the records
  • Search facility - the user should be able to search the database for items.
  • Order/Update facility - the user can order/update using a form

 


Web databases are interactive so that:

  • You can provide new content to a database by filling in a form and sending the details online
  • Database content can be retrieved dynamically in response to a user’s request/search.
  • On a retailing site customers can see product content in the database and send requests for orders to the firm/organisation running the web site

 


Types of web database 

See the textfile about databases for some definitions and terms. You can set up a local link to it and incorporate the output into your own HTML page.


(1) Simple Flat file and Relational Databases

The easiest to construct and use are asci textfile databases (tab, comma or pipe delimited)

These are easy to construct in a plain text editor such as 'Notepad'. They can contain links to images.

There is a great range avilable varying in complexity from simple linear search to more complex binary search databases

Dreamweaver has no special routines for these databases

  • The database will be controlled by a cgi script (usually a Perl script) held in the cgi-bin on your hosting server
  • The database is uploaded onto the server in the normal way
  • The database will be interactive. Any user can view the records or query the database if the script allows it.
  • Normally the web master will have a password protected interface to upload, save and edit changes.

(2) Dynamic Flatfile and Relational Databases - using Dreamweaver routines

Dreamweaver has support for the more complex databases where all the database routines will be held serverside using interactive technology such as PHP or ASP and powered by more complex query languages such as SQL.

Using MX you can make dynamic database driven pages (previously done in Dreamweaver UltraDev)

  • Go to File/New and select the technology you want to use to make your interactive database page

dynamic new page

What you select depends on 2 things

  • What technology you can use with your supplier. This will depend largely on what you pay for your site to be hosted! - cheaper hosted accounts may only support PHP
  • If you are going to use a server-based relational database you need to see what your hosting account supports.
  • Your supplier can set up database processing for you (a common choice is MYSQL)
  • If you know how to link a database made in a program like Access to the web site you can set it up using ASP pages.

This site has examples of flat file Perl driven databases and describes how to construct a PHP dynamic page to connect to a MYSQL database held on a remote server.


Setting up a database on web pages

To continue go to:



<Index Page