Graphics Programs Reference
In-Depth Information
Exploring Databases and Dynamic Page Content
One of the best ways to extend the functionality of a Web site is to connect the site to a
database. A database is a collection of information that is arranged for ease and speed
of search and retrieval and is usually associated with a specifi c software package such
as Microsoft Access or a specifi c database server such as MySQL. A database can be a
simple list of people's names or it can be a large collection of complex information such
as product inventory. A database-driven Web site is a Web site that uses a database to
gather, display, or manipulate information. For example, e-commerce sites often use a
database to store online orders and billing information, and weather sites often retrieve
current weather conditions from a database and display the reports in a Web page. The
NextBest Fest site will use a database to store the information collected from a form in
the contact.html page.
There are different ways to create database-driven Web sites. The method employed
depends on the amount of data being served out, the number of users potentially access-
ing that information simultaneously, the budget available, and the technology already
being used. Some large companies, such as Panasonic and LG Electronics, Inc., use
expensive database software like Oracle or DB2 to serve out massive amounts of data to
multiple users. If you plan to serve out massive amounts of information to thousands of
users simultaneously and have access to a large budget, this is a great solution. However,
even many large companies are turning to other solutions, and if you are creating a
medium or small database-driven site, these other database software solutions are more
realistic for your needs.
The two database software packages used most frequently with medium and small
Web sites are MySQL and Microsoft Access. MySQL is a free, open source database
engine that was designed specifi cally for Web use. Both Google and Yahoo! use MySQL
as their database engine. It is usually installed by default on Linux servers. MySQL can
also be installed on Windows servers. Additional information about MySQL is available
at mysql.com . Access is a database management program that is part of the Microsoft
Offi ce suite. Windows servers can serve out Access fi les by default if the permissions are
set correctly for the database fi le.
In addition to selecting a database, you must also select the programming or scripting
language that you will use to create server behaviors. Server behaviors are behaviors that
run on the Web server before the Web page is sent to a user's browser and are written
in PHP, ASP, ASP.NET, JSP, or ColdFusion. You will use server behaviors to communicate
with a database (send data and retrieve data) and to turn data into plain HTML that can
be displayed in a browser as part of a Web page.
All server behaviors use SQL when addressing databases. SQL (Structured Query
Language) is a specialized language used for working with databases. When Web pages
display data stored in a database, they are said to be dynamically generated . You will
use server behaviors to process data collected from the form in the contact.html page
and stored in the database to create HTML code. This code will display an overview of
the data stored in the database and will display the details of selected records from the
database_details page. Using server behaviors to generate dynamic pages is much more
effi cient than updating content manually each time the information changes.
This tutorial provides two methods for creating the database-driven pages in the
NextBest Fest site. If you are working with a Linux server, you will use a MySQL database
and PHP to create the database-driven pages. If you are working with a Windows server,
you will use an Access database and ASP to create the pages. Each method requires dif-
ferent steps and methodologies, both of which are provided in this tutorial.
Regardless of which method you use, the general process for creating the database-
driven pages in the NextBest Fest site is:
• Adjust the form in the contact.html page.
• Create the Web pages you will need.
• Place or create the database on the remote server.
Search WWH ::




Custom Search