You are on page 1of 31

Database Processing, 13e (Kroenke/Auer)

Chapter 11: The Web Server Environment

1) Every DBMS product has an application programming interface (API).


Answer: TRUE
Diff: 1 Page Ref: 438

2) Every DBMS product uses the same API.


Answer: FALSE
Diff: 2 Page Ref: 438

3) ODBC stands for Open Database Connectivity.


Answer: TRUE
Diff: 1 Page Ref: 438

4) If a server is using a Microsoft Windows operating system, it is usually running Internet


Information Server (IIS) as its Web server.
Answer: TRUE
Diff: 1 Page Ref: 462

5) The most commonly used Web server on servers running the Unix or Linux operating system
is Internet Information Server (IIS).
Answer: FALSE
Diff: 2 Page Ref: 462

6) If the Web server and the DBMS are running on the same server, the system has a three-tier
architecture.
Answer: FALSE
Diff: 1 Page Ref: 439

7) ODBC has not had practical success, but has shown great potential for future development.
Answer: FALSE
Diff: 2 Page Ref: 439-440

8) ODBC works with table-like data sources such as relational databases and spreadsheets.
Answer: TRUE
Diff: 1 Page Ref: 439-440

9) ODBC acts as a wrapper for OLE DB.


Answer: FALSE
Diff: 3 Page Ref: 439-440

10) With ODBC, a database and the DBMS that processes it are identified by the data source.
Answer: TRUE
Diff: 1 Page Ref: 439-440

1
ScholarStock
11) With ODBC, the driver manager serves as an intermediary between the application and the
DBMS drivers.
Answer: TRUE
Diff: 1 Page Ref: 440 Fig 11-3

12) With ODBC, only a single driver is needed to handle all data source types, such as Oracle,
DB2, and Access.
Answer: FALSE
Diff: 3 Page Ref: 440 Fig 11-3

13) In ODBC, the amount of work that the driver must do is largely determined by the degree of
SQL-compliance of the data source.
Answer: TRUE
Diff: 2 Page Ref: 440-441

14) A multiple-tier ODBC driver may reformat an SQL request, but it does not actually process
the SQL statement.
Answer: TRUE
Diff: 3 Page Ref: 440-441

15) With ODBC, a file data source is available only to the user that created it.
Answer: FALSE
Diff: 3 Page Ref: 442-443

16) In general, the best type of ODBC data source to define for a Web application is a system
data source.
Answer: TRUE
Diff: 3 Page Ref: 442-442

17) OLE DB objects are COM objects.


Answer: TRUE
Diff: 2 Page Ref: 449

18) OLE DB can be used to access ODBC data sources.


Answer: TRUE
Diff: 2 Page Ref: 449 Fig 11-11

19) OLE DB is an object-oriented interface.


Answer: TRUE
Diff: 1 Page Ref: 449-450

20) In OLE DB, a RecordSet is a more abstract representation of a rowset.


Answer: FALSE
Diff: 2 Page Ref: 450

2
ScholarStock
21) Object classes have properties that represent characteristics of the objects in the class.
Answer: TRUE
Diff: 1 Page Ref: 451

22) One of the properties of all collections is Count, which is the number of objects in the
collection.
Answer: TRUE
Diff: 2 Page Ref: 451

23) In OLE DB, all of an object's properties must be exposed in all interfaces, but not all
methods have to be exposed.
Answer: FALSE
Diff: 1 Page Ref: 451

24) One important result of OLE DB is that data does not have to be moved or converted from
one form to another.
Answer: TRUE
Diff: 1 Page Ref: 451

25) An OLE DB service provider accepts data from an OLE DB tabular data provider.
Answer: TRUE
Diff: 1 Page Ref: 452-453

26) ADO provides access to ODBC functionality to programming languages that ordinarily could
not access ODBC functions.
Answer: FALSE
Diff: 3 Page Ref: 453 Fig 11-15

27) ADO is accessible from languages such as C++ and C#, but not Visual Basic or scripting
languages.
Answer: FALSE
Diff: 2 Page Ref: 453

28) ADO was (and still is) frequently used for database applications.
Answer: TRUE
Diff: 1 Page Ref: 453

29) ADO.NET is a completely new product, with no connection to ADO except the similar name.
Answer: FALSE
Diff: 1 Page Ref: 453-454

30) ADO.NET provides the capability to create and process in-memory databases called
DataSets.
Answer: TRUE
Diff: 1 Page Ref: 453-454

31) An ADO.NET DataSet has all the characteristics, features, and functions of a regular

3
ScholarStock
database.
Answer: TRUE
Diff: 1 Page Ref: 455-457

32) An ADO.NET DataSet is connected to databases.


Answer: FALSE
Diff: 1 Page Ref: 455-457

33) An ADO.NET dataset can have primary and foreign keys, but ADO.NET does not support
referential integrity.
Answer: FALSE
Diff: 2 Page Ref: 455-457

34) Once an ADO.NET dataset is constructed, its contents can be formatted as an XML
document with a single command.
Answer: TRUE
Diff: 2 Page Ref: 455-457

35) An ADO.NET dataset can only be used with optimistic locking.


Answer: TRUE
Diff: 2 Page Ref: 455-457

36) Only open source products may be used in conjunction with JDBC.
Answer: FALSE
Diff: 2 Page Ref: 457-458

37) To use JDBC, programs must be written in Java.


Answer: TRUE
Diff: 1 Page Ref: 457-458

38) JDBC drivers only exist for a limited number of DBMS products at this time.
Answer: FALSE
Diff: 2 Page Ref: 457-458

39) JDBC-ODBC bridge drivers resolve inconsistencies between Java and C/C++ to allow Java
access to ODBC data sources.
Answer: TRUE
Diff: 1 Page Ref: 458

40) Type 2 JDBC drivers access ODBC data sources over a network.
Answer: FALSE
Diff: 2 Page Ref: 458

41) Type 4 JDBC drivers translate JDBC calls into a DBMS-independent network protocol.
Answer: FALSE
Diff: 3 Page Ref: 458

4
ScholarStock
42) Java programs are compiled into machine-independent bytecode.
Answer: TRUE
Diff: 1 Page Ref: 458

43) Java programs tend to execute faster than programs compiled into machine-dependent code
because the Java virtual machine only has to interpret the bytecode.
Answer: FALSE
Diff: 2 Page Ref: 458

44) An applet is a Java bytecode program that executes on the Web server.
Answer: FALSE
Diff: 1 Page Ref: 458

45) Applet bytecode is sent to the user's computer and is invoked using the HTTP protocol.
Answer: TRUE
Diff: 2 Page Ref: 458

46) Java programs that access a database from an applet must use a Type 2 JDBC driver.
Answer: FALSE
Diff: 3 Page Ref: 458-459

47) The first step in using a JDBC driver is to establish a connection.


Answer: FALSE
Diff: 2 Page Ref: 459

48) JSP can be coded only in Java and JavaScript.


Answer: FALSE
Diff: 2 Page Ref: 460

49) JSP pages are automatically re-compiled if the uncompiled JSP page is newer than the
compiled version of the page.
Answer: TRUE
Diff: 1 Page Ref: 460-461 Fig11-22

50) Basic Web pages are created using Hypertext Markup Language (HTML).
Answer: TRUE
Diff: 1 Page Ref: 464

51) HTML is defined by the World Wide Web Consortium (W3C).


Answer: TRUE
Diff: 2 Page Ref: 465

52) A common default Web page name recognized by most Web servers is FirstPage.html.
Answer: FALSE
Diff: 2 Page Ref: 465

53) Database processing and document processing are unrelated to one another.

5
ScholarStock
Answer: FALSE
Diff: 1 Page Ref: 486

54) HTML is an application of a document markup language called Standard Generalized


Markup Language (SGML).
Answer: TRUE
Diff: 1 Page Ref: 486

55) In the 1990s the database community and the document processing community created a
standard called Expandable Markup Language (XML).
Answer: FALSE
Diff: 2 Page Ref: 486

56) XML provides a standardized, non-customizable way to describe the content of a document.
Answer: FALSE
Diff: 2 Page Ref: 486

57) Unlike SQL views, XML views are not limited to one multivalued path.
Answer: TRUE
Diff: 3 Page Ref: 486

58) SOAP was originally an XML-based standard for providing remote procedure calls over the
Internet.
Answer: TRUE
Diff: 2 Page Ref: 486

59) XML designers created a system that allows document structure, data content, and
materialization to be mixed.
Answer: FALSE
Diff: 2 Page Ref: 487

60) DTD stands for Document Type Declaration.


Answer: TRUE
Diff: 1 Page Ref: 487

61) Possible uses of XML go far beyond using it to display Web pages.
Answer: TRUE
Diff: 3 Page Ref: 487

62) All type-valid XML documents are required to have a DTD.


Answer: TRUE
Diff: 1 Page Ref: 487

63) XSLT is a declarative transformation language.


Answer: TRUE
Diff: 2 Page Ref: 488-489

6
ScholarStock
64) XML documents that conform to their DTD are said to be type-valid XML documents.
Answer: TRUE
Diff: 2 Page Ref: 487

65) XML documents that do not conform to their DTD are said to be non-type-valid XML
documents.
Answer: TRUE
Diff: 2 Page Ref: 487

66) XSLT is a robust and powerful transformation language that can be used to materialize XML
documents into HTML.
Answer: TRUE
Diff: 2 Page Ref: 488

67) XSLT is a non-declarative transformation language.


Answer: FALSE
Diff: 2 Page Ref: 488-489

68) An XSLT stylesheet is used by XSLT to indicate how to transform the elements of an XML
document into another format.
Answer: TRUE
Diff: 2 Page Ref: 489-490

69) An XSLT command embedded in the structure of an XSLT stylesheet is of the form {loop,
action}.
Answer: FALSE
Diff: 3 Page Ref: 490-492

70) When XSLT actions are indicated in a loop, the loop ends with </xsl:for-each>.
Answer: TRUE
Diff: 3 Page Ref: 490-492

71) XSLT processors are context oriented; that is, each statement is evaluated within the context
of the match that has already been made.
Answer: TRUE
Diff: 3 Page Ref: 490-492

72) After an XSLT processor transforms an XML document into an HTML document, the HTML
document is materialized using a browser.
Answer: TRUE
Diff: 3 Page Ref: 492

73) Most of today's Web browsers still lack a built-in XSLT processor.
Answer: FALSE
Diff: 2 Page Ref: 492

74) XML Schema is a synonym for Document Type Declaration (DTD).

7
ScholarStock
Answer: FALSE
Diff: 2 Page Ref: 492

75) XML documents that conform to an XML Schema are validated against that schema.
Answer: TRUE
Diff: 1 Page Ref: 492

76) XML documents and XML Schemas are created in different languages.
Answer: FALSE
Diff: 2 Page Ref: 492

77) An important improvement of XML Schema over DTDs is that XML Schemas are
themselves XML documents.
Answer: TRUE
Diff: 2 Page Ref: 492

78) The first statement of an XML document indicates the schema that will be used to validate
the document.
Answer: FALSE
Diff: 2 Page Ref: 493

79) XML Schemas consist of elements, attributes, and properties.


Answer: FALSE
Diff: 1 Page Ref: 494

80) In XML Schema, there are two types of elements, simple and composite.
Answer: FALSE
Diff: 2 Page Ref: 494

81) Elements of complexType must have more than one simple element.
Answer: FALSE
Diff: 2 Page Ref: 494

82) For database/XML applications, a good rule to follow is that elements are used to carry data
and attributes are used to carry metadata.
Answer: TRUE
Diff: 2 Page Ref: 495

83) In XML Schema, the default cardinality of elements is 0.1.


Answer: FALSE
Diff: 3 Page Ref: 495

84) In XML Schema, the default minimum cardinality can be overridden using the minOccurs
attributes.
Answer: TRUE
Diff: 2 Page Ref: 495

8
ScholarStock
85) Setting the minimum cardinality to 0 is similar to using a NULL constraint in SQL.
Answer: TRUE
Diff: 3 Page Ref: 495

86) An XML Schema where all the elements occur at the same level is called a structured
schema.
Answer: FALSE
Diff: 2 Page Ref: 495

87) To eliminate definition duplication, XML Schema elements can be declared globally.
Answer: TRUE
Diff: 1 Page Ref: 499-501

88) SQL Server has facilities for generating XML documents from database data.
Answer: TRUE
Diff: 1 Page Ref: 501

89) Oracle requires the use of Java for generating XML documents from database data.
Answer: TRUE
Diff: 1 Page Ref: 501

90) MySQL Server does not have facilities for generating XML documents from database data.
Answer: FALSE
Diff: 1 Page Ref: 501

91) The SQL Server statement SELECT...FOR XML is used to place column data as elements in
an XML document.
Answer: FALSE
Diff: 2 Page Ref: 501-503

92) The SQL Server statement SELECT ...FOR XML RAW tells SQL Server to place the data
values from the columns in the table into XML elements.
Answer: TRUE
Diff: 2 Page Ref: 501-503

93) The SQL Server statement SELECT...FOR XML EXPLICIT is used to control placement of
column data as either elements or attributes in an XML document.
Answer: TRUE
Diff: 2 Page Ref: 501-503

94) The SQL Server statement SELECT...FOR XML can only be used with a single table.
Answer: FALSE
Diff: 2 Page Ref: 506

9
ScholarStock
95) XML processing provides a standardized facility to describe, validate, and materialize any
database view.
Answer: TRUE
Diff: 2 Page Ref: 514

96) Few industries have shown an interest in developing XML industry standards.
Answer: FALSE
Diff: 1 Page Ref: 514-519 Fig11-62

97) XML industry standards have been published for the Accounting industry.
Answer: TRUE
Diff: 3 Page Ref: 514-519 Fig11-62

98) Xquery is a standard for expressing generalized queries on XML documents.


Answer: TRUE
Diff: 2 Page Ref: 519-521 Fig11-63

99) XML Namespaces are used to define domains, support domains, and disambiguate terms.
Answer: TRUE
Diff: 2 Page Ref: 519-521 Fig11-63

100) Which of the following can only interact with relational database and table-like data
structures?
A) OLE DB
B) ODBC
C) ASP
D) ADO
E) All of the above
Answer: B
Diff: 1 Page Ref: 439-440

101) Which of the following is true about ODBC?


A) ODBC has experienced little practical success.
B) ODBC requires developers to have a thorough knowledge of many DBMS native libraries.
C) ODBC can be used to access data from spreadsheets.
D) ODBC has an object-oriented interface.
E) ODBC does not include facilities to return error messages.
Answer: C
Diff: 2 Page Ref: 439-443

10
ScholarStock
102) According to the ODBC standard, which of the following is not part of the specification of a
data source?
A) The associated DBMS
B) The database
C) The driver
D) The operating system
E) The network platform
Answer: C
Diff: 2 Page Ref: 439-440

103) The ODBC standard defines a means of doing which of the following?
A) Start transactions
B) Rollback transactions
C) Create a connection
D) Issue SQL commands
E) All of the above
Answer: E
Diff: 1 Page Ref: 439-440

104) Which of the following is a function performed by the driver manager in ODBC?
A) Submit SQL statements to the data source
B) Determine the type of DBMS that processes a given ODBC data source
C) Load the appropriate ODBC driver into memory
D) Convert data source error codes into ODBC error codes
E) B and C
Answer: E
Diff: 1 Page Ref: 440-441

105) The intermediary between the application and the DBMS drivers in the ODBC architecture
is the ________.
A) driver manager
B) OLE DB interface
C) ODBC driver
D) data source
E) database connector
Answer: A
Diff: 1 Page Ref: 440 Fig 11-3

106) Which of the following is a task performed by the driver according to the ODBC standard?
A) Determines the appropriate DBMS
B) Validates the format of the ODBC command received from the application
C) Converts data source error codes into ODBC standard error codes
D) Verifies the application to the data source
E) Converts the data source into an SQL-compliant data structure
Answer: C
Diff: 2 Page Ref: 440-441

11
ScholarStock
107) The ________ processes ODBC requests and submits specific SQL statements to a given
type of data source.
A) driver manager
B) ADO
C) driver
D) source converter
E) ODBC translator
Answer: C
Diff: 1 Page Ref: 440-441

108) A data source that is fully SQL-compliant would use what type of DBMS driver?
A) Single-tier
B) Multiple-tier
C) SQL transform
D) Text-based
E) Conformance
Answer: B
Diff: 3 Page Ref: 440-441

109) How does an application determine the level of ODBC conformance available from a
driver?
A) The application makes a call to the driver manager.
B) The application makes a call to the data source.
C) The application makes a call to the driver.
D) The developer must determine the level of conformance before the application is written.
E) It does not have to determine ODBC conformance since all ODBC drivers have the same
functionality by definition.
Answer: C
Diff: 2 Page Ref: 440-442

110) Support for a scrollable cursor is a sign of what type of conformance in a DBMS driver?
A) Level 1 API
B) Extended SQL Grammar
C) Core API
D) Level 2 API
E) Core SQL Grammar
Answer: D
Diff: 3 Page Ref: 441-442 Fig 11-5

12
ScholarStock
111) Support for subqueries and creating indexes is a sign of what type of SQL conformance in a
DBMS driver?
A) Level 2 API
B) Minimum SQL Grammar
C) Core API
D) Extended SQL Grammar
E) Core SQL Grammar
Answer: E
Diff: 3 Page Ref: 442 Fig 11-6

112) A ________ data source can be shared among database users as long as they have the same
DBMS driver and privilege to access the database.
A) file
B) common
C) shared
D) system
E) user
Answer: A
Diff: 1 Page Ref: 442-443

113) A data source that is local to a single computer and can be used by the operating system and
any user on that computer is called a ________ data source.
A) file
B) common
C) shared
D) system
E) user
Answer: D
Diff: 1 Page Ref: 442-443

114) In general, for Web applications it is best to create what type of data source on the Web
server?
A) File
B) Common
C) Shared
D) System
E) User
Answer: D
Diff: 2 Page Ref: 442-443

13
ScholarStock
115) OLE DB breaks the features and functions of a DBMS into what type of objects?
A) COM
B) DBMS
C) MTS
D) ODBC
E) ASP
Answer: A
Diff: 2 Page Ref: 449-450

116) Which of the following is not true about OLE DB?


A) Scripting languages cannot access OLE DB.
B) OLE DB is object-oriented.
C) OLE DB can access ODBC data sources.
D) OLE DB can access non-relational data sources.
E) OLE DB is used as a wrapper for ADO objects.
Answer: E
Diff: 1 Page Ref: 449-450

117) The characteristics of an object are called ________.


A) classes
B) collections
C) methods
D) properties
E) procedures
Answer: D
Diff: 1 Page Ref: 451

118) The actions that an object can perform are called ________.
A) classes
B) collections
C) methods
D) properties
E) procedures
Answer: C
Diff: 1 Page Ref: 451

119) An important method of a collection is a(n) ________, which can be used to pass through or
otherwise identify the items in the collection.
A) iterator
B) identifier
C) converter
D) transformer
E) signal
Answer: A
Diff: 3 Page Ref: 451

14
ScholarStock
120) A set of objects and the properties and methods that they expose are known as a(n)
________.
A) provider
B) data consumer
C) implementation
D) instantiation
E) interface
Answer: E
Diff: 1 Page Ref: 451

121) Which of the following is a type of OLE DB data provider?


A) relational data provider
B) method provider
C) sequential data provider
D) tabular data provider
E) implementation provider
Answer: D
Diff: 2 Page Ref: 452-453

122) Which standard interface in OLE DB is invoked to declare a forward-only cursor?


A) IRowSet
B) IAccessor
C) IColumnsInfo
D) adXact
E) ADODB
Answer: A
Diff: 3 Page Ref: 453 Fig 11-14

123) Which of the following is not true of ADO?


A) ADO is a simple object model for OLE DB data consumers.
B) ADO can be used from VBScript and JavaScript.
C) ADO is harder to understand than OLE DB.
D) ADO can be called from languages such as Visual Basic.NET, Java and C#.
E) All of the above are true of ADO.
Answer: C
Diff: 3 Page Ref: 453

124) Which of the following is true about ADO.NET?


A) It is an improved and expanded version of ADO.
B) It facilitates the transformation of XML documents to and from relational database constructs.
C) It provides the ability to create and process in-memory databases.
D) A and B
E) A, B, and C
Answer: E
Diff: 1 Page Ref: 453-454

15
ScholarStock
125) ADO.NET in-memory databases are called ________.
A) adoBases
B) adoDatabases
C) dotNetBases
D) dotNetDatabases
E) DataSets
Answer: E
Diff: 1 Page Ref: 455

126) An ADO.NET Data Provider is a(n) ________ that provides ADO.NET services.
A) class library
B) windows application
C) Web application
D) XML service
E) DND service
Answer: A
Diff: 2 Page Ref: 455-457

127) Which of the following is true about ADO.NET DataSets?


A) They can have multiple tables and relationships.
B) They can have foreign keys and surrogate keys.
C) They can support referential integrity actions.
D) A and B
E) A, B, and C
Answer: E
Diff: 2 Page Ref: 455-457

128) Which of the following is true of JDBC?


A) Programs must be written in Java.
B) JDBC only works with open-source products.
C) JDBC is only available for Unix-like operating systems, such as Linux.
D) JDBC is actually a DBMS.
E) B and C
Answer: A
Diff: 1 Page Ref: 457-458

129) What type of JDBC driver is known as a JDBC-ODBC bridge?


A) Type J-O driver
B) Type 1 driver
C) Type 2 driver
D) Type 3 driver
E) Type 4 driver
Answer: B
Diff: 2 Page Ref: 458 Fig 11-20

16
ScholarStock
130) What type of JDBC driver connects to the native API of the DBMS?
A) Type J-O driver
B) Type 1 driver
C) Type 2 driver
D) Type 3 driver
E) Type 4 driver
Answer: C
Diff: 2 Page Ref: 458 Fig 11-20

131) What type of JDBC driver translates JDBC calls into DBMS-independent network
protocols?
A) Type J-O driver
B) Type 1 driver
C) Type 2 driver
D) Type 3 driver
E) Type 4 driver
Answer: D
Diff: 3 Page Ref: 458 Fig 11-20

132) What type of JDBC driver translates JDBC calls into DBMS-specific network protocols?
A) Type J-O driver
B) Type 1 driver
C) Type 2 driver
D) Type 3 driver
E) Type 4 driver
Answer: E
Diff: 3 Page Ref: 458 Fig 11-20

133) A Java virtual machine is actually a ________.


A) program compiler
B) JDBC data source
C) bytecode interpreter
D) JDBC driver
E) servlet
Answer: C
Diff: 1 Page Ref: 458

134) Which of the following is true about bytecode interpretation?


A) It may be performed on the client.
B) It may be performed on the server.
C) It is slower than running a program compiled into machine code.
D) It increases portability.
E) All of the above.
Answer: E
Diff: 1 Page Ref: 458

17
ScholarStock
135) Applet bytecode is transmitted to the user's computer via ________.
A) the JDBC driver
B) the Java virtual machine
C) HTTP
D) SQL
E) the bytecode interpreter
Answer: C
Diff: 2 Page Ref: 458

136) A(n) ________ is a Java program that is interpreted and executed by a bytecode interpreter
on the Web server.
A) applet
B) Java virtual machine
C) servlet
D) HTTP
E) JDBC translator
Answer: C
Diff: 1 Page Ref: 459

137) In a three-tier or n-tier architecture, which type of JDBC driver can be used if the DBMS
and the Web server are running on the same computer?
A) Type 1 driver
B) Type 2 driver
C) Type 3 driver
D) Type 4 driver
E) All of the above.
Answer: E
Diff: 3 Page Ref: 459

138) The first step in using a JDBC driver is to ________.


A) establish a connection to the database
B) load the driver
C) create a statement
D) call the DriverManager object
E) invoke the executeQuery method
Answer: B
Diff: 2 Page Ref: 459

139) The coding for Java Server Pages must be written in ________.
A) Java
B) JavaScript
C) C++
D) Visual Basic
E) Any of the above
Answer: A
Diff: 1 Page Ref: 460

18
ScholarStock
140) Which of the following is true about JSP code?
A) It must be written in Java or JavaScript.
B) It does not have access to HTTP functionality.
C) It must be coded as complete Java classes and methods.
D) It is automatically converted into Java servlets.
E) All of the above.
Answer: D
Diff: 2 Page Ref: 460-461

141) Which of the following is not true about Tomcat?


A) It is a servlet processor.
B) it can be used as a standalone Web server.
C) It is often used in conjunction with Apache.
D) It is an applet processor.
E) It has limited Web server facilities.
Answer: D
Diff: 2 Page Ref: 460-471

142) JSP pages are ________.


A) automatically compiled by the servlet processor as needed
B) required to be compiled by the developer before being made public
C) automatically checked for syntax errors by the servlet as they are written
D) slower to execute but more memory efficient than CGI files
E) A and D
Answer: A
Diff: 3 Page Ref: 460-461 Fig11-22

143) As compared to CGI files, JSP pages ________.


A) are less memory efficient
B) require more processor time
C) execute faster
D) keep more copies of a given page in memory
E) None of the above
Answer: C
Diff: 3 Page Ref: 461

144) In PHP, any programming language statements that are to be processed on the server must
be enclosed in:
A) <!-- and --!>.
B) [php and php].
C) (php and php).
D) <?php and ?>.
E) <server> and </server>.
Answer: D
Diff: 1 Page Ref: 471

19
ScholarStock
145) The first PHP element to be created is the:
A) Command object.
B) Connection object.
C) Errors collection.
D) Parameters collection.
E) RecordSet object.
Answer: B
Diff: 2 Page Ref: 471-472

146) The final step of using a PHP connection to a DBMS is to:


A) open the connection.
B) test the connection.
C) query the database.
D) process the query results.
E) close the connection.
Answer: E
Diff: 2 Page Ref: 473

147) PDO stands for:


A) PHP Data Objects.
B) PHP Design Objects.
C) Personal Data Objects.
D) Personal Design Objects.
E) None of the above.
Answer: A
Diff: 2 Page Ref: 475

148) HTML is an application of ________.


A) SGML
B) XML
C) SOAP
D) XSLT
E) ADO.NET
Answer: A
Diff: 1 Page Ref: 486

149) XML stands for ________.


A) Experimental Markup Language
B) Extendable Markup Language
C) Extensible Markup Language
D) Active X-control Markup Language
E) Active X-control Management Language
Answer: C
Diff: 2 Page Ref: 486

20
ScholarStock
150) Which of the following is true about XML?
A) It is a subset of SGML.
B) Additional standards and capabilities have been added to XML processing.
C) It is a hybrid of document processing and database processing.
D) A and B
E) A, B, and C
Answer: E
Diff: 2 Page Ref: 486

151) SOAP originally stood for ________.


A) Simple Operational Application Protocol
B) Standard Operational Application Protocol
C) Simple Object Application Protocol
D) Simple Object Access Protocol
E) Standard Object Access Protocol
Answer: D
Diff: 2 Page Ref: 486

152) SOAP has become ________.


A) just a name, not an acronym
B) a standard protocol for sending any type of message
C) an old technology replaced by XML
D) A and B
E) A, B, and C
Answer: D
Diff: 2 Page Ref: 486

153) Which of the following is true about XML?


A) It allows the confounding of document structure, content, and format.
B) It is non-standardized to allow for extension by developers.
C) The structure of documents is formally defined.
D) XML tags, like some HTML tags, are vague and arbitrary.
E) None of the above.
Answer: C
Diff: 1 Page Ref: 487

154) The first section of an XML document might be a ________.


A) Document Definition Section (DDS)
B) Document Type Declaration (DTD)
C) Data Type (DTYPE)
D) Document Type (DOCTYPE)
E) Type Declaration (TYPEDECL)
Answer: B
Diff: 2 Page Ref: 487

21
ScholarStock
155) The document type declaration for an XML document begins with the keyword ________.
A) XML
B) DTD
C) TYPE
D) DOCTYPE
E) TYPEDECL
Answer: D
Diff: 3 Page Ref: 487

156) XML documents that conform to their DTD are said to be ________.
A) DTD-valid
B) XML-valid
C) DTD-compliant
D) not-type-valid
E) type-valid
Answer: E
Diff: 1 Page Ref: 487

157) XML documents that are not-type-valid can still be ________.


A) DTD-valid
B) XML-valid
C) DTD-compliant
D) XML-compliant
E) proper XML documents
Answer: E
Diff: 2 Page Ref: 487

158) Which of the following is not true about document type declarations for XML documents?
A) They are not required.
B) They are required for type-valid documents.
C) They cannot be contained inside the XML document.
D) Storing the DTD externally allows many documents to be validated against the same DTD.
E) The DTD can be extended by the developer with any elements he or she wants to include.
Answer: C
Diff: 2 Page Ref: 487

159) Which of the following is not true about XSLT?


A) It is a declarative language.
B) It is a transformation language.
C) It can materialize XML documents into HTML.
D) It can transform an XML document into another XML document with a different structure.
E) It requires the use of CSS.
Answer: E
Diff: 2 Page Ref: 488-489

22
ScholarStock
160) Which of the following is true about XSLT?
A) It can be used to materialize XML documents into HTML.
B) XSLT processors are context oriented.
C) It is a non-declarative transformation language.
D) A and B
E) A, B, and C
Answer: D
Diff: 3 Page Ref: 488-489

161) XML Schema is used to define ________.


A) document content and structure
B) XQL queries
C) DOM-compliant parsers
D) DTDs
E) XPath searches
Answer: A
Diff: 1 Page Ref: 492

162) XML documents can be ________ against their XML Schema.


A) measured
B) grown
C) validated
D) browsed
E) All of the above
Answer: C
Diff: 1 Page Ref: 492

163) An important improvement of XML Schema over DTDs is that ________.


A) XML Schema can be stored external to the document
B) XML Schema support XQL queries
C) XML Schema are XML documents
D) XML Schema are not required
E) XML Schema can validate XML documents
Answer: C
Diff: 1 Page Ref: 492-493

164) The XML Schema "mother of all schemas" is located at ________.


A) a user-defined Web server for each organization
B) www.w3.org
C) www.google.com
D) www.microsoft.com
E) www.xmlschema.net
Answer: B
Diff: 2 Page Ref: 493

23
ScholarStock
165) The XML Schema statement xmlns:xsd indicates that ________.
A) this XML Schema uses a labeled namespace called xsd
B) this XML Schema is validated at www.xsd.com
C) this XML Schema is validated at www.xmlns.com using the xsd XML Schema located there
D) this XML Schema is using a non-standard looping procedure, where xsd is the variable name
of the loop increment
E) the value of the variable xmnls is being set equal to the value of the variable xsd
Answer: A
Diff: 2 Page Ref: 494

166) XML Schemas consist of ________.


A) elements
B) attributes
C) properties
D) A and B
E) A, B, and C
Answer: D
Diff: 1 Page Ref: 494

167) Which of the following is a type of element in an XML Schema?


A) simple
B) composite
C) compound
D) complex
E) A and D
Answer: E
Diff: 1 Page Ref: 494-495

168) XML Schema elements of the complexType may contain ________.


A) one simple element
B) one complexType element
C) more than one simple element
D) more than one complexType element
E) Any of the above
Answer: E
Diff: 2 Page Ref: 494-495

169) In an XML Schema, the tags <xsd:ComplexType>...<\xsd:ComplexType> indicate that:


A) a sequence of numbers is listed between the tags.
B) a sequence of letters or words is listed between the tags.
C) a set of elements will occur in a multi-layered format between the tags.
D) A or B
E) A, B, or C
Answer: C
Diff: 3 Page Ref: 494-495 Fig11-51

24
ScholarStock
170) In database/ XML applications, it is a recommended practice that ________.
A) elements carry data, and attributes carry metadata
B) elements carry metadata, and attributes carry data
C) elements and attributes carry data, and the XML Schema carry metadata
D) elements and attributes carry metadata, and the XML Schema carry data
E) either A or B
Answer: A
Diff: 3 Page Ref: 495

171) The default cardinality for elements in an XML Schema is ________.


A) 0.1
B) 1.1
C) 1.N
D) N.1
E) M.N
Answer: B
Diff: 2 Page Ref: 495

172) The use of the XML Schema expression minOccurs="0" ________.


A) is an XML Schema default
B) is required as there are no defaults in an XML Schema
C) is similar to the SQL schema NULL constraint
D) A and C
E) B and C
Answer: C
Diff: 3 Page Ref: 495

173) XML Schema that have all elements residing at the same level are called ________.
A) flat
B) structured
C) single-leveled
D) multi-leveled
E) styled
Answer: A
Diff: 1 Page Ref: 495

25
ScholarStock
174) The SQL Server statement

SELECT *
FROM Table01
FOR XML RAW

tells SQL Server to place the data values from the columns in the table into XML ________.
A) elements
B) attributes
C) either elements or attributes, as chosen by SQL Server
D) either elements or attributes, as designated by the developer
E) either elements or attributes, as designated by the XML Schema
Answer: B
Diff: 1 Page Ref: 501-503

175) The SQL Server statement

SELECT *
FROM Table01
FOR XML EXPLICIT

tells SQL Server to place the data values from the columns in the table into XML ________.
A) elements
B) attributes
C) either elements or attributes, as chosen by SQL Server
D) either elements or attributes, as designated by the developer
E) either elements or attributes, as designated by the XML Schema
Answer: D
Diff: 2 Page Ref: 501-503

176) The SQL Server XML SELECT statements can be applied to ________.
A) single table SELECT statements
B) multiple table SELECT statements
C) XML Schema statements
D) A and B
E) A, B, and C
Answer: D
Diff: 2 Page Ref: 501-503

26
ScholarStock
177) XML is important because XML processing provides a standardized facility to ________
any database view.
A) describe
B) validate
C) materialize
D) A and B
E) A, B, and C
Answer: E
Diff: 1 Page Ref: 514

178) The standard for locating particular elements within a document is called ________.
A) XML
B) XSL
C) XPath
D) SAX
E) DOM
Answer: C
Diff: 2 Page Ref: 519-521 Fig11-63

179) XQuery is a standard for expressing ________.


A) queries as ADO.NET datasets
B) queries as XML documents
C) queries on SQL databases
D) A and B
E) A, B, and C
Answer: B
Diff: 2 Page Ref: 519-521 Fig11-63

180) Explain the relationships among native DBMS libraries, ODBC, OLE DB, ADO, and
ADO.NET and why each led to the development of the next.
Answer: All of these provide means of data access. Native DBMS libraries are the least abstract
and are DBMS-specific access methods. Due to the large numbers of data sources that
developers have to deal with, learning that many DBMS libraries was cumbersome. ODBC
developed as a more abstract means of data access that shielded developers from having to learn
multiple native DBMS libraries. One shortcoming of ODBC, however, was that it can only
access data from sources that have a table-like structure. Therefore, OLE DB was developed as a
means of accessing data from a much broader range of data source types. OLE DB is an object-
oriented interface that is suitable for use by many object-oriented languages. Many developers,
however, use languages such as Visual Basic and scripting languages that cannot access OLE
DB. ADO was therefore developed to further abstract OLE DB and provide access to OLE DB
functionality to programming languages that cannot directly access OLE DB. ADO has been
followed by ADO.NET, which is part of Microsoft's .NET initiative. It extends the functionality
of ADO.
Diff: 2 Page Ref: 437-439

27
ScholarStock
181) Briefly describe the components of the ODBC architecture.
Answer: In the ODBC architecture, the application program, driver manager, and DBMS drivers
reside on the Web server, and the database and DBMS reside on the database server. The
combination of the database and its associated DBMS comprise the data source. The data source
contains the data used by the application. The application program talks to the driver manager.
When the application requests a connection, the driver manager checks to see which DBMS the
data source uses and loads the appropriate DBMS driver into memory. The driver manager also
checks the format of the ODBC requests coming from the application program. The DBMS
driver processes the ODBC requests and submits the SQL statements to the data source. The
driver also ensures that the responses coming from the data source are in appropriate ODBC
format.
Diff: 2 Page Ref: 439-441

182) What are the different types of conformance levels within the ODBC standard, and why do
they exist?
Answer: There are two types of conformance levels within the ODBC standard—ODBC
conformance and SQL conformance. ODBC conformance deals with the features and functions
that are available to the application program through the DBMS driver API. The SQL
conformance standard deals with the SQL statements, expressions, and data types that the driver
can process. The reason for these levels is to accommodate the varying ability of different
vendors to comply with the power and expressiveness of the ODBC standard and the SQL
language. Without these different levels of compliance, the ODBC standard would either be too
simple to be very useful, or too rigorous for many vendors to comply with.
Diff: 3 Page Ref: 441-442

183) Why is the decomposition of the features and functions of a DBMS into different objects an
advantage for OLE DB?
Answer: First, by breaking the features of the DBMS into different objects, vendors have the
option of implementing only a portion of their product in OLE DB. This is significant since the
all-or-nothing approach required with ODBC was a major disincentive to vendors because of the
large investment necessary to achieve ODBC compliance. OLE DB allows the vendor to increase
their OLE DB participation in a piecemeal fashion. Second, it allows vendors to create multiple
interfaces to their products that have different properties and methods exposed. This improves
flexibility for data consumers since they can select an interface that only provides the methods
they need, and it is more flexible for data providers since they can change the implementation of
an interface without negatively impacting their data consumers.
Diff: 3 Page Ref: 449-453

28
ScholarStock
184) What is ADO.NET and what is an ADO.NET DataSet?
Answer: ADO.NET is an improved and expanded version of Active Data Objects (ADO).
ADO.NET handles the transformation of XML documents between the documents and
associated relational databases. ADO.NET can also create and process in-memory databases
called datasets. ADO.NET uses ADO.NET data providers, which are class libraries of ADO.NET
services, to communicate with (1) Oracle, (2) SQL server and (3) any OLE DB-compliant
DBMS. (The information necessary to write ADO.NET class libraries is publicly available so
that other data providers may be written.) An ADO.NET dataset is an in-memory database
maintained by ADO.NET. Datasets have all the characteristics, features and functions of regular
databases, but an ADO.NET DataSet is disconnected from the database. This allows ADO.NET
to manipulate the dataset without changing the associated database until ADO.NET is ready to
make changes.
Diff: 2 Page Ref: 453-457

185) Distinguish among the four types of JDBC drivers.


Answer: Type 1 drivers are JDBC-ODBC bridge drivers that resolve some of the inconsistencies
between Java and C/C++ to provide access to ODBC data sources from Java. Type 2 drivers are
written wholly in Java, and they connect to the native API of the DBMS. Type 3 and Type 4
drivers have network capabilities. Type 3 drivers transform JDBC calls into a DBMS-
independent network protocol. Type 4 drivers transform JDBC calls into DBMS-specific
network protocols.
Diff: 2 Page Ref: 457-449 Fig11-20

186) Compare and contrast servlets and applets.


Answer: Servlets and applets are both Java programs compiled into machine-independent
bytecode. Both are interpreted and executed by bytecode interpreters called Java virtual
machines. Both are invoked using the HTTP protocol. Servlets, however, are interpreted and
executed on the Web server computer. It then sends its results to the user's computer via the
response capabilities of HTTP. Applets, on the other hand, are interpreted and executed on the
user's computer. The bytecode for the applet is transmitted via HTTP to the user's computer,
where the Java virtual machine will interpret and execute it locally.
Diff: 1 Page Ref: 458-459

187) Explain the process by which JSP pages are compiled.


Answer: All JSP pages are compiled into servlets. When a JSP page is requested, the servlet
processor checks to see if the uncompiled version of the JSP page is older or newer than the
compiled servlet. If the servlet is older than the uncompiled version of the JSP page, then the JSP
page is parsed into standard Java source code and is recompiled into a new version of the servlet.
This new version of the servlet is then loaded into memory. If the uncompiled version of the JSP
page was created at or before the time of the current servlet, the servlet processor checks to see if
the current servlet is already loaded into memory. If it is not, then the servlet is loaded. In either
case, the servlet is then ready to be executed by the servlet processor.
Diff: 2 Page Ref: 460-461 Fig11-22

29
ScholarStock
188) Briefly describe PHP.
Answer: PHP, which is an abbreviation for PHP: Hypertext Processor, is a popular scripting
language that can be embedded in Web pages. PHP allows users to connect to databases, run
SQL commands against the databases, and then process the results of the SQL commands for
display on Web pages. PHP commands are enclosed in <?php and ?> elements.
Diff: 1 Page Ref: 461-468

189) Briefly describe Eclipse.


Answer: Eclipse is an open-source Integrated Development Environment (IDE). An IDE is
intended as a complete application development framework, with all the tools needed to create
applications easily and conveniently available to application developers. For use with PHP, a
modified version of Eclipse is available from the Eclipse PHP Development Tools (PDT) Project.
Eclipse is a popular tool for working with PHP. It is available for most operating systems.
Diff: 1 Page Ref: 468

190) What is XML, and why is it significantly better than HTML?


Answer: XML stands for Extensible Markup Language, and it is a subset of Standard
Generalized Markup Language (SGML). XML is significantly better than HTML because: (1)
XML provides a clean break between document structure, content, and materialization, which
prevents the confounding of these functions; and (2) while XML is standardized, it allows for
extension by application developers. The structure of any document is formally defined with
XML in a standardized way.
Diff: 1 Page Ref: 486-487

191) What is an XML DTD?


Answer: An XML DTD is a Document Type Declaration. A DTD is the first section of an XML
document, while the document data itself makes up the second part of the document. The DTD
begins with the DOCTYPE, and then details the name of the document and its structure. The data
that is actually in the second part of the document may or may not conform to the DTD. If the
document does conform to the DTD the document is called a type-valid XML document, and if
the document does not conform to the DTD it is called a non-type-valid XML document. A
document can be not-type-valid, and still be a good XML document.
Diff: 2 Page Ref: 487

192) What is XSLT?


Answer: XSLT stands for Extensible Style Language: Transformations. It is a transformation
language used to—among other things—(1) materialize XML documents into HTML and (2)
transform a formatted XML document into another XML document in a different format. XSLT
is a declarative transformation language, and uses stylesheets to specify how to transform
elements of an XML document into another format. XSLT processors are context oriented, and
most Web browsers have a built-in XSLT processor.
Diff: 2 Page Ref: 488-489

30
ScholarStock
193) What is an XML Schema?
Answer: An XML schema defines the structure and content of XML documents. It is similar to a
DTD specification, but better because it extends the DTD specification. Further, an XML
Schema is itself an XML Schema, so no other syntax is needed. Since you can evaluate an XML
document against its schema, and since XML Schemas are XML documents, you can evaluate
XML Schemas. The "schema of all schemas"—which is the ultimate source of XML Schema
validation—is located at www.w3.org. Schemas consist of elements and attributes, and elements
may be simple or complex. A good rule to follow is that elements should carry data and attributes
should carry metadata.
Diff: 2 Page Ref: 492-493

194) What are flat and structured XML Schemas?


Answer: XML Schemas are called "flat" when all the schema elements are at the same level.
When this format is broken up into groups, the resulting structure has multiple levels, and is
called a "structured" schema.
Diff: 2 Page Ref: 495-498

195) What is an XML global element?


Answer: An XML Schema global element is a group of elements defined and named at the
beginning of an XML Schema. This allows it to be reused throughout the schema by being
inserted as a named element. This, in turn, allows the schema to be consistent when using certain
structures. An example of this is a phone number, which is likely to be used more than once in a
schema.
Diff: 2 Page Ref: 499-501

196) How can XML be used with a DBMS?


Answer: One example is the use of XML with SQL Server. Here we use the SQL FOR XML
clause to retrieve XML data from the database. The query results are returned to a single cell.
This output can be expanded and copied to other documents. FOR XML can be modified with
SQL keywords such as RAW (column values are placed as attributes in the XML document) and
{AUTO, ELEMENTS} (column values are placed as elements in the XML document). SQL
queries using the FOR XML clause can be multitable queries.
Diff: 2 Page Ref: 501-514

197) What is XPath?


Answer: XML is developed as a set of standards. XPath is one of these standards, and it is the
standard for addressing elements in documents. This means it is used to locate specific elements
in a document.
Diff: 2 Page Ref: 519-521 Fig11-63

198) What is XQuery?


Answer: XML is developed as a set of standards. XQuery is one of these standards, and it is the
standard for expressing generalized queries on XML documents. This means it is the "SQL" for
XML documents.
Diff: 2 Page Ref: 519-521 Fig11-63

31
ScholarStock

You might also like