Why Do I Need A Database?

If you're not familiar with the term as it relates to the web,
a database is a structured collection of data. It can be anything
from a list of email addresses to a set of names, addresses and
phone numbers.

By far the most popular database management system is mySQL,
because it is free, works well, and most web hosts have it
installed. This can be used in conjunction with a language such
as PHP or Cold Fusion to create a website which interacts with
the database.

PHP is probably the most popular of languages for interacting
with mySQL databases. It can be easily used to create webpages
for your site dynamically. This means that, rather than a site
consisting of many static or unchanging webpages, each page is
generated based on information in your database, at the time the
page is accessed by a user.

Creating a web site in a language such as PHP and using a
database to store the information, or some of it, has many
advantages over a normal static site.

One of the most common and most useful ways to use a database
in your website is in a content management system.

What Is It And How Does It Work?
--------------------------------

A content management system is a set of programs (basically,
webpages containing programming code) written in a language such
as PHP. The content management system displays the content of
your website to your visitors and allows you to easily add, edit
or remove content from the site without creating a new webpage.

This is accomplished by storing the content of the site in a
database. Rather than creating a "page1.html" with a layout,
title, content, etc. you would store the title and content in
the database, along with any other information you wanted like
the author name, keywords, etc.

Then, rather than having a link to "page1.html" you'd have a
URL that looked something like this:

http://www.yoursite.com/article.php?id=123

Article.php would be a page you've written in PHP which gets
information from your database. The "?id=123" passes the fact
that the user has clicked on a link to article number 123. The
page would access your database, find article 123, and send back
a webpage to your visitor with that article in the body. But,
the difference between this and a static page is that you use
the same webpage to access other information:

http://www.yoursite.com/article.php?id=124

You're accessing the same article.php, but you've told it you
want article 124, and a new page would be created and sent
to you with article 124 in the body.

The content management system also would allow you to add, edit
or remove content from your site without editing many webpages.
You'd simply have separate pages setup which allow you to edit
the information stored in the database.

Why Do I Want To Do This?
-------------------------

There are many reasons to use a database-driven content
management system as opposed to many static webpages. Several
are:

1. Easier To Change Site Design

With a database-driven site, there is really only one webpage.
The content of the site is inserted into this page dynamically
when it is requested based on information passed to the page
(such as the article number).

This means changing the look of the entire site can be as easy
as changing the HTML in that one page. The page would contain
both HTML and programming code for whatever language you chose.

2. Easier To Update Your Site

Using a database-driven content system, you no longer have to
create a separate webpage for each piece of content you want
on your site. By setting up a form which submits information to
add to your database, you can update the site just by copying and
pasting a piece of content into the form, and adding it to the
database. If you write the site to take articles based on date,
for example, the new content could appear immediately on your
site.

How Do I Create a Content Management System?
--------------------------------------------

Here are several places you can learn about building a database-
driven website, specifically with PHP and mySQL:

1. http://hotwired.lycos.com/webmonkey/programming/php/

WebMonkey's PHP Programming section has many well-written
articles and tutorials dealing with both PHP programming and
interacting with mySQL. They even have a "PHP/mySQL Tutorial."

2. http://hotwired.lycos.com/webmonkey/backend/databases/

WebMonkey's Backend Databases section includes information about
choosing a database system, an introduction to databases,
several tutorials and more.

3. http://wdvl.com/Authoring/Languages/PHP/

The Web Developer's Virtual Library has several good tutorials
and information about the PHP language and how to use it in
conjunction with mySQL databases.

There are many uses of databases in websites, and a content
management system is just one of them. Hopefully this article
has informed you on exactly what a database is and has provided
you with several links to good starting points for those who
are interested in using a database in their site.


About the Author

Dan Grossman runs http://www.websitegoodies.com where you can
find over 250 hand-picked resources, articles, and tools! Dan
also publishes the free weekly "WebDevPortal" newsletter for
website owners! Subscribe today and get articles like this every
week: mailto:subscribe@webdevportal.com?subject=article-subscribe

More Web Development and other resouces to help you locate great articles just like Why Do I Need A Database? :

Here are other categories to find more must know information on anything and everything.
Auto and Trucks
Business and Finance
Computers and Internet
Education
Environment
Family
Food and Drink
Gadgets and Gizmos
Gardening
Government
Health
Hobbies
Home Improvement
Kids and Teens
Legal Matters
Marketing
Music and Entertainment
Online Business
Parenting
Pets and Animals
Recreation and Sports
Self Improvemen
Site Promotion
Travel and Leisure
Web Development
Women
Writing
Here are more Web Development articles to give you more must know information just like in Why Do I Need A Database? article.

Keep Your Navigation Consistent!
One of the single most important aspects of effective navigation is consistency. Why? There's a simple reason. Visitors want familiarity. They are more comfortable and more trusting if they know thin...
Read more


How To Take Payments On Your Website
After my two-part article about selling things on your website, I had several people ask for more details on billing companies and shopping carts. So here goes.

If you were to Google for billing card companies, you'd find out that there are thousa...
Read more


Web Hosting: Selecting the Right Host!
Choosing a web hosting company is a very personal decision based on your own unique needs. Web hosting is what places your website into the World Wide Web, where anyone can access to it 24 hours a day. In other words, without placing your site onto a web ...
Read more


How to Choose a Web Host - Frequently Asked Questions
In this article you’ll be provided with helpful information about how to choose a web host. There are several things to look for when choosing a reliable web host. Below, you will be provided with fr...
Read more


The Disability Discrimination Act (DDA) & Web Accessibility
There's been widespread speculation about the new legislation being introduced under the DDA (Disability Discrimination Act), which will ensure that websites are accessible to blind and disabled user...
Read more


 

Thank you very much for viewing this must know article: Why Do I Need A Database? . Hopefully you have found all the information you were looking for in " Why Do I Need A Database? ". If you feel like you need more information feel free to check out Info Pom HOMEPAGE to look for more articles in our humangous database

Site Partners:
Background Check