Databases Reference
In-Depth Information
Web server receives the request, retrieves the Web page, and then runs server-side extensions associated with
the Web page using API. These extensions, among other actions, include instructions for interacting with the
database, usually in the form of SQL commands, using API and ODBC in this example. The database server,
which contains the DBMS, deals directly with the database and returns the required data back through the
ODBC/API interfaces to the Web server. The Web server customizes the HTML document based on the
server-side extensions and the data from the database and the Web client; then using TCP/IP and HTTP, the
Web server transmits the Web page over the Internet to the Web client. The Web browser displays the Web page
on the user's screen, executing any client-side extensions as appropriate. Interaction between the Web cli-
ent, the Web server, and the database server continues in a similar fashion as the user at the Web client fills
in data or chooses options in the delivered Web page and sends follow-up Web page requests to the Web server.
Web server
requests data from
the database via the
database server
Web client
sends request for a
Web page to the
Web server
289
Web
client
HTTP and
TCP/IP
HTTP and
TCP/IP
ODBC
and API
Internet
Database
server sends
requested data to
the Web server
Web
server
Database
server
Web server
sends the customized
Web page to the Web client,
which runs any client-
side extensions
Web server
retrieves the Web page
and runs server-side
extensions
Database
server accesses
the database
Web pages
Database
FIGURE 9-8
Three-tier Web-based architecture
A further complication for database processing over the Web is that HTTP is inherently a stateless proto-
col, which means that once the Web server responds to a Web client request for a Web page by delivering the
page, the connection between the two is closed and the Web server retains no information about the request
or the Web client. The stateless nature of HTTP allows for maximum throughput of Web pages through the
Internet. However, the stateless nature of Web pages is at odds with most e-commerce processing. Con-
sider placing an order over the Internet. If you've ever done so, you know that you might view and interact
with dozens of Web pages to select the products you want to buy and to place them in a shopping cart. Then
you view the shopping cart Web page, making adjustments to the products you are ordering; view another Web
page to confirm the order; enter your name and address information in another Web page; enter your credit
card information in a different Web page; and finally go through additional Web pages to confirm and place the
final order. In this scenario, the vendor's Web server must somehow remember the key data from many differ-
ent Web pages, even though each delivered Web page is stateless. Organizations use several techniques to
remember key data supplied by a Web client. Among the client-side techniques are cookies (small files writ-
ten on a Web client's hard drive by a Web server) and hidden form fields, while server-side solutions usu-
ally include storing session information in a database or using other forms of session management, where a
session is the duration of a Web client's connection to a Web server.
Organizations benefit in many ways from using the Web for database processing. They can transfer data
to and from their databases to suppliers, customers, and others outside the company; this provides current
information in a timely way to those needing the information. As another example, a company can allow cus-
tomers to place orders that directly update the organization's database and trigger the processing required to
fulfill the orders. Additionally, Web clients can access an organization's Web pages at their convenience 24-7.
The tradeoffs for an organization using the Web for database processing include the increased complexities and
 
 
 
 
Search WWH ::




Custom Search