Options for Database Publishing - HTML

Two methods are commonly used for database publishing: pre-generated content and on-demand content. Each method has its advantages and disadvantages, as discussed in the following sections.

A server-side script can be relied upon to store and retrieve data from a database.

A server-side script can be relied upon to store and retrieve data from a database.

The same script can manipulate the data in many ways before passing it back to the server for delivery to the requesting client.

Pre-generated content
The concept of pre-generated content relies upon background scripts being run on the server at regular intervals, generating static pages from the database content. For example, a script might run every few hours to refresh the content, allowing recent articles or prices to appear on the appropriate pages.Pre-generated content is typically used on sites that experience a high volume of traffic, or where the content doesn’t change much.

The advantage to pre-generating content is that it takes the load off of the database server, letting the Web server do what it does best, serve static HTML pages. The disadvantages are that the content isn’t as timely (it’s only as up-to-date as the frequency of the generating script allows it to be), and the user cannot dynamically generate the content.

On-demand content
On-demand content relies on server-side scripts to deliver the data each time a user visits a page. The scripts query the database for appropriate content and display it as required on each page. For example, a “Recent Headlines” script might run at the top of the main page, displaying the headlines of the most recent articles. On-demand content is typically used on sites that experience a lower volume of traffic or on sites where the content changes rapidly or must be accurate up-to-the-minute.

The advantage to on-demand content is that it can be as current as the data in the database allows. The requesting scripts can also dynamically generate the content, allowing a user more control over what he or she sees. The disadvantage is that this method places more load on the scripts and database; the scripts are run and the database is accessed each time a page is requested.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML Topics