INSTRUCTOR’S MANUAL
TO ACCOMPANY
40th Anniversary Edition
DATABASE PROCESSING
Fundamentals, Design, and Implementation
15th Edition
Chapter 11
The Web Server Environment
David M. Kroenke | David J. Auer | Scott L. Vandenberg | Robert C. Yoder
Chapter Eleven The Web Server Environment
Page 11-2
CHAPTER OBJECTIVES
To understand the nature and characteristics of the data environment that surrounds
Internet technology database applications
To learn the purpose, features, and facilities of ODBC
CHAPTER ERRATA
[08-MAY-2018 David Auer] Page 565. There is missing text in Review Question
11.89. The corrected question text is:
What are the problems in interpreting a tag such <h2> as in HTML?
TEACHING SUGGESTIONS
Make sure that your students understand how each of the database access
standards relates to the others, and why it is needed.
Chapter Eleven The Web Server Environment
This chapter is basically divided into two major parts. The first is a mostly theoretical
discussion of ODBC, OLE DB, ADO.NET, ASP.NET, JBDC, and JSP.NET The
second is a practical, hands-on introduction to using PHP. This second part
introduces basic PHP constructs the student needs to display database information
using PHP Web pages.
PHP is an extensive topic and just the basics are covered in the text.
There is some material on Web site file system security in Appendix I. If you have
time, talk more about database system security, using that material as a starting
point. Web sites often use the IUSR_ServerName account to access databases.
This is the IIS anonymous user account, and while it can be used to demonstrate the
use of Web pages to access databases, in the “real world” it should never be given
extended security privileges. IUSR_ServerName should be strictly a read-only
account. To run stored procedures from Web pages using IUSR_ServerName,
IUSR_ServerName may need to be given Execute permission to the stored
procedurenot necessarily a good idea! Discuss how to create appropriate
database security accounts, and how to use them to allow appropriate selected
individuals the necessary rights over the Internet. If you are not familiar with IIS
security, contact your network / Web site administrator for more information.
Solution database and Web files for your use are available in the Instructor’s
Chapter Eleven The Web Server Environment
Page 11-4
ANSWERS TO REVIEW QUESTIONS
11.1 Describe why the data environment is complicated.
Internet technology applications need to publish database applications that involve dozens of
11.2 Explain how ODBC, OLE DB, and ADO are related.
ODBC was created to address concerns about relational databases and data sources that are table
like, such as spreadsheets. ODBC is an interface between the Web server (or other database user)
11.3 Explain the author’s justification for describing Microsoft standards. Do you agree?
OLE DB, ADO, and ADO.NET were developed and promulgated by Microsoft, and even ODBC
11.4 Name the components of the ODBC standard.
Application program, driver manager, DBMS drivers, and data source
11.5 What role does the driver manager serve? Who supplies it?
The driver manager serves as an intermediary between the application and the DBMS drivers.
11.6 What role does the DBMS driver serve? Who supplies it?
A driver processes ODBC requests and submits specific SQL statements to a given type of data
Chapter Eleven The Web Server Environment
Page 11-5
11.7 What is a single-tier driver?
11.8 What is a multiple-tier driver?
A multiple-tier driver processes ODBC calls, but passes the SQL requests directly to the database
11.9 Do the uses of the term tier in the three-tier architecture and its use in ODBC have
anything to do with each other?
11.10 Why are ODBC conformance levels important?
ODBC Conformance levels allow all vendors to comply with a set of minimal standards and at
11.11 Summarize the three ODBC API conformance levels.
Core API
Connect to data sources
Chapter Eleven The Web Server Environment
11.12 Summarize the three ODBC SQL grammar conformance levels.
Minimum SQL Grammar
CREATE TABLE, DROP TABLE
simple SELECT (does not include subqueries)
INSERT, UPDATE, DELETE
11.13 Explain how the three types of ODBC data sources differ.
1) A file data source is a file that can be shared among database users. The only requirement
is that the users have the same DBMS driver and privilege to access the database. The data
11.14 Which ODBC data source type is recommended for Web servers?
In general, the best choice for Web applications is to create a system data source on the Web
11.15 What are the two tasks to be accomplished when setting up an ODBC data source
name?
Chapter Eleven The Web Server Environment
Page 11-7
11.16 What is the Microsoft.NET Framework? What basic elements does it include?
The .NET Framework is Microsoft’s comprehensive application development platform. Web
database applications tools are included in the .NET Framework. Originally released as the .NET
Framework 1.0 in January 2002, the current version is the .NET Framework 4.7.1 (and this is the
version needed for use with SQL Server 2017).
Chapter Eleven The Web Server Environment
Page 11-8
11.17 What is the current version of the .NET Framework, and what new features does it
include?
While .NET Framework 4.7.1 was current as of the printing of the book, as of the writing of this
11.18 Why is OLE DB important?
OLE DB is one of the foundations of data access in the Microsoft world. As such, it is important
11.19 What disadvantage of ODBC does OLE DB overcome?
With ODBC, a vendor must create an ODBC driver for almost all DBMS features and functions
11.20 Define abstraction and explain how it relates to OLE DB.
An abstraction is a generalization of something. ODBC interfaces are abstractions of native
11.21 Give an example of abstraction involving rowset.
11.22 Define object properties and methods.
Properties represent characteristics of the recordset abstraction. For example, a recordset object
11.23 What is the difference between an object class and an object?
Strictly speaking, the definition of an object abstraction is called an object class, or just class. An
Chapter Eleven The Web Server Environment
11.24 Explain the role of data consumers and data providers.
11.25 What is an interface?
11.26 What is the difference between an interface and an implementation?
11.27 Explain why an implementation can be changed but an interface should not be changed.
The implementation is performed behind the scenes. The users never see or even know how the
11.28 Summarize the goals of OLE DB.
Create object interfaces for DBMS functionality pieces
Query
Update
Transaction management
Chapter Eleven The Web Server Environment
11.29 Explain the difference between a tabular data provider and a service provider. Which
transforms OLE DB data into XML documents?
Tabular data providers present their data via rowsets. Tabular data providers bring data of some
11.30 In the context of OLE DB, what is the difference between a rowset and a cursor?
11.31 What is ADO.NET?
ADO.NET is a greatly expanded version of ADO that Microsoft introduced as part of its .NET
11.32 What is a data provider?
11.33 What is a data reader?
11.34 How can ADO.NET be used to process a database without using DataReaders or
DataSets?
ADO.NET provides a command object, which provides functionality similar to that provided by
the ADO command objects.
11.35 What is an ADO DataSet?
11.36 How do ADO DataSets differ conceptually from databases?
Chapter Eleven The Web Server Environment
Page 1111
11.37 List the primary structures of an ADO.NET DataSet, as described in this chapter.
Multiple tables
Relationships between tables
11.38 How do datasets solve the problem of views with multivalue paths?
Microsoft recognized the problem of views with multivalue paths, and ADO.NET incorporates
Chapter Eleven The Web Server Environment
Page 1112
11.39 What is the chief disadvantage of ADO.NET DataSets? When is this likely to be a
problem?
Datasets are disconnected from underlying DBMS databases, which means that only optimistic
11.40 Why, in database processing, is it important to become an object-oriented programmer?
In order to use ADO.NET, you have to use one of the ADO.NET programming languages, and
11.41 What is an ADO.NET Connection?
11.42 What is a Data Adapter?
11.43 What is the purpose of the SelectCommand property of a Data Adapter?
The SelectCommand property is the ADO.NET data adapter equivalent of the SQL SELECT
11.44 How is a data table relationship constructed in ADO.NET?
11.45 How is referential integrity defined in ADO.NET? What referential integrity actions are
possible?
Referential integrity is defined using the ADO.NET ForeignKeyConstraint objects. The
11.46 Explain how original, current, and proposed values differ.
The dataset keeps three versions of each column in each datatable:
(1) Original value The value as first read from the DBMS database, or
the value after a committed change in the dataset
(via the AcceptChanges method)
Chapter Eleven The Web Server Environment
Page 1113
11.47 How does an ADO.NET DataSet allow for trigger processing?
11.48 What is the purpose of the UpdateCommand property of a Data Adapter?
11.49 What are the purposes of the InsertCommand and DeleteCommand of a Data Adapter?
The InsertCommand is the ADO.NET data adapter equivalent of the SQL INSERT command,
11.50 Explain the flexibility inherent in the use of the InsertCommand, UpdateCommand, and
DeleteCommand properties.
11.51 What is the one major requirement for using JDBC?
11.52 What does JDBC stand for?
JDBC now stands for Java Database Connectivity. According to Sunthe inventor of Java and
11.53 What are the four JDBC driver types?
1. JDBC-ODBC bridge. Provides a Java APl that interfaces to an ODBC driver. Enables
processing of ODBC data sources from Java.
Chapter Eleven The Web Server Environment
Page 1114
11.54 Explain the purpose of Type 1 JDBC drivers.
11.55 Explain the purpose of Types 2, 3, and 4 JDBC drivers.
Type 2: DBMS must reside on the same machine, or the DBMS must handle the intermachine
communication, if not.
11.56 Define applet and servlet.
An applet is a Java bytecode program that runs on the application user’s computer. Applet
11.57 Explain how Java accomplishes portability.
To accomplish portability, Java programs are not compiled into a particular machine language,
11.58 List the four steps of using a JDBC driver.
1. Load the driver.
11.59 What is the purpose of Java Server Pages?
Java Server Pages (JSP) provide a means to create dynamic Web pages using HTML (and XML)
Page 1115
11.60 Describe the differences between ASP and JSP.
JSP and ASP look similar because they both blend HTML with program code. The difference is
11.61 Explain how JSPs are portable.
11.62 What is the purpose of Tomcat?
Tomcat is a servlet processor that can work in conjunction with Apache or as a standalone Web
server.
11.63 Describe the process by which JSPs are compiled and executed. Can a user ever
access an obsolete page? Why or why not?
When a request for a JSP page is received, a Tomcat (or other) servlet processor finds the
11.64 Why are JSP programs preferable to CGI programs?
Unlike CGI files and some other Web server programs, there is a maximum of one copy of a JSP
11.65 What is Hypertext Markup Language (HTML), and what function does it serve?
Hypertext Markup Language is a standard set of syntax rules and document tags that are used to
Chapter Eleven The Web Server Environment
Page 1116
11.66 What are HTML document tags, and how are they used?
HTML document tags indentify specific uses or functions of portions of the text in the Web page.
11.67 What is the World Wide Web Consortium (W3C)?
The W3C is the group that defines HTML, XML and other Web standards.
11.68 Why is index.html a significant file name?
The filename index.html is one of only a few filenames that most Web servers automatically
11.69 What is PHP, and what function does it serve?
PHP, which is an abbreviation for PHP: Hypertext Processor (and which was previously known
11.70 How is PHP code designated in a Web page?
11.71 How are comments designated in PHP code?
PHP code segments with two forward slashes (//) in front of them are comments. This symbol is
11.72 How are comments designated in HMTL code?
11.73 What is an Integrated Development Environment (IDE), and how is it used?
An Integrated Development Environment (IDE) is an application designed to put all needed
Chapter Eleven The Web Server Environment
11.74 What is the NeatBeans IDE?
The NetBeans IDE is an IDE developed and maintained by the open-source development
11.75 Show a snippet of PHP code for creating a connection to a database. Explain the
meaning of the code.
<?php
// Get connection
$DSN = “VRG”;
11.76 Show a snippet of PHP code for creating a RecordSet. Explain the meaning of the code.
<?php
// Create SQL statement
$SQL = “SELECT LastName, FirstName, Nationality FROM ARTIST”;
// Execute SQL statement
Chapter Eleven The Web Server Environment
Page 1118
11.77 Show a snippet of PHP code for displaying the contents of a RecordSet. Explain the
meaning of the code.
<!– Page Headers –>
<h1>
The View Ridge Gallery Artist Table
</h1>
<hr />
//Table data
while($RecordSetRow = odbc_fetch_array($RecordSet))
{
echo “<tr>”;
echo “<td>” . $RecordSetRow[‘LastName’] . “</td>”;
echo “<td>” . $RecordSetRow[‘FirstName’] . “</td>”;
echo “<td>” . $RecordSetRow[‘Nationality’] . “</td>”;
echo “</tr>”;
}
echo “</table>”;
?>
11.78 Show a snippet of PHP code for disconnecting from the database. Explain the meaning
of the code.
11.79 With respect to HTTP, what does stateless mean?
Saying that HTTP is stateless means that it has no provision for maintaining sessions between
Chapter Eleven The Web Server Environment
11.80 Under what circumstances does statelessness pose a problem for database processing?
11.81 In general terms, how are sessions managed by database applications when using
HTTP?
11.82 What are PHP Data Objects (PDO)?
11.83 What is the significance of PDOs?
11.84 Show two snippets of PHP code that compare creating a connection to a database in
standard PHP and in PDO. Discuss the similarities and differences in the code.
Here are two snippets to create a data connection. The first is standard PHP, while the second is
PDO.
Chapter Eleven The Web Server Environment
11.85 Why do database processing and document processing need each other?
11.86 How are HTML, SGML, and XML related?
HTML is a language used to mark up documents for display by Web browsers. HTML is an
11.87 Explain the phrase standardized but customizable.
Standardized means always using the same techniques the same way. Customizable means
11.88 What is SOAP? What did it stand for originally? What does it stand for today?
SOAP originally meant Simple Object Access Protocol. It was defined as an XML-based standard
11.89 What are the problems in interpreting a tag such as <h2> in HTML?
We cannot rely on tags to indicate the true structure of an HTML page. Tag use is too arbitrary;
11.90 What requirement is necessary for processing XML documents with Oracle?
11.91 Explain how SQL Server 2017 produces XML output using theFOR XML RAW clause.