If you're not familiar with term as it relates to 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 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 database.
PHP is probably 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 time page is accessed by a user.
Creating a web site in a language such as PHP and using a database to store information, or some of it, has many advantages over a normal static site.
One of 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 content of your website to your visitors and allows you to easily add, edit or remove content from site without creating a new webpage.
This is accomplished by storing content of site in a database. Rather than creating a "page1.html" with a layout, title, content, etc. you would store title and content in database, along with any other information you wanted like 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 fact that 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 body. But, difference between this and a static page is that you use same webpage to access other information:
http://www.yoursite.com/article.php?id=124
You're accessing 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 body.