With a database driven website, the website content isn't actually reside in HTML files on the server, it is rather contained in rows and columns in a database. A website with its content stored in HTML files on the file system is often referred to as a "static" website, whereas a database driven website is often referred to as a "dynamic". Thus a database driven website is a website that has most of its content in a database.
Content Management Systems
A website with dynamic content usually has a CMS (Content Management System) to assist the content providers in updating the website. A CMS is usually provided in the form of an administration area where content providers need to log in before they can add content. Once logged in, they can create, update and delete articles. They may be able to upload files such as Word documents, PDF files etc. They might be able to upload images too.
All of this content can be stored in the database. Some may be stored on the file system too though. For example, although documents and images can be stored in the database, there are sometimes reasons to store them on the file system. Performance is often a key reason. Database size is another.
Discussion Forums and Blogs
Discussion forums and blogs have become a popular feature for many websites. Most, if not all, forums and blogs are database driven. Users can register their details, then add content. When the user clicks the "Submit" button, their details/content is inserted into the database. Then when someone decides to view this content, it is read from the database using SQL (Structured Query Language).
Combination of Static and Dynamic
Some websites have a combination of static content and dynamic content. There could be any number of reasons for this. Often, smaller websites will be static. There's little need to configure a database just to store a handful of webpages - much easier and cheaper to keep them as files on the server. Even websites like this might contain some added functionality such as a discussion forum, or a blog. In this case, the discussion forum or blog will need its content stored in a database.
Benefits of a Database Driven Website
Database driven websites can provide much more functionality than a static site can. Extended functionality could include:
- Enabling many (potentially non-technical) users to provide content for the website. Users can publish articles on the website without needing to FTP them to a web server.
- Shopping cart
- You can provide advanced search functionality that enables users to filter the results based on a given field. They can then sort those results by a field - say "Price" or "Date".
- Customized homepage
- You can allow your users to perform tasks such as registering for a newsletter, post questions to your forums, provide comments on a blog, update their profile, etc.
- Integration with corporate applications such as CRM systems, HR systems etc
- Much more