A database-driven website is basically just a website being put together from parts stored in a database. Most popular content management systems use a database, including Drupal, Wordpress, and MODx.
For a simple example, you might have the following pieces of your website kept separately:
When your About Us page is visited, an entire HTML webpage is pulled together:
Header + About Us Title + About Us Content + Footer
The same thing happens with the Contact Us page:
Header + Contact Us Title + Contact Us Content + Footer
The main advantage of keeping website pieces stored separately in a database is a Modular Design.
To sum it up, you pick and choose the elements that go inside every page. In the above example, the header and footer was re-used for every page, while a title and content specific to the page was inserted in only for that page.
The real gains start happening when you get more and more elements to build with. One page might have a header, main menu, and footer that is shared with the entire site, content and title specific to the page, a comments form that is only used on article pages, a sub-menu specific to the page category, etc....
Using a modular design almost always results in less work. By keeping repeating elements separated, you are able to re-use them without having to re-write them.
Database-powered websites also have the advantage of organization.
MODx, for instance, keeps everything separate: page-specific content, variables, repeating HTML, templates (page structure and appearance), PHP code, modules, and more. This allows for a well-organized, easily expanded, modular web page with everything from galleries to user accounts.
Posted on May 16, 2010 by Default Admin User