JDBC Architecture and Models - Quiz Explanation

The correct answers are indicated below, along with text that explains the correct answers.
1. Dr. Tucano understands that JDBC can provide many benefits for the system you will create. Which of the following is NOT a benefit of using JDBC?
Please select the best answer.
  A. Systems built with JDBC are relatively easy to move to different platforms.
  B. JDBC programs are largely independent of the database to which they are connected.
  C. JDBC programs are tightly integrated with the server operating system.
  D. JDBC programs can be written to connect with a wide variety of databases.
  The correct answer is C.
JDBC applications, as is the case with most Java programs, are not tightly tied to a specific operating system. This characteristic directly contributes to the flexibility of moving Java applications to many different platforms. Answers A, B, and D are incorrect because these are all benefits of using JDBC .


2. You are in the meeting with Dr. Tucano, who likes the illustration of the JDBC architecture. How would you summarize the programmatic interaction between the application, JDBC, and the database in a two-tier model?
Please select the best answer.
  A. A call is issued by JDBC to connect to the database; a SELECT statement is issued; and JDBC processes the result set back to the client application.
  B. A call is issued by JDBC to connect to the database; a SELECT statement is issued; and JDBC processes the result set back to the server.
  C. A JDBC call is issued by the client application to connect to the database; a SELECT statement is issued; and JDBC returns a result set to the client application.
  D. A call is issued by the server to connect to the database;, a SELECT statement is issued, and JDBC processes the result set back to the client application.
  The correct answer is C.
When the data is returned, a result set object is created by JDBC and forwarded to the client application. Answers A, B, and D are incorrect because the client application issues the call through JDBC, which then issues a SELECT statement that goes to the data source (server).

3. In which layer of the JDBC architecture does the JDBC-ODBC bridge reside?
Please select the best answer.
  A. It resides in the client program layer.
  B. t resides in the database layer.
  C. It resides in both the client program and database layers.
  D. It resides in the JDBC layer.
  The correct answer is D.
The JDBC-ODBC bridge is part of the JDBC API. Answers A, B, and C are incorrect because the JDBC API is separate and a part of neither the application nor the database.


4. Which database application model would an enterprise-wide solution most likely adopt?
Please select the best answer.
  A. The monolithic model
  B. The two-tier model
  C. The n-tier model
  D. The didactic model
  The correct answer is C.
The key advantages to an n-tier model include: 1) Scalability: n-tier architectures allow scaling of systems beyond the limits of two-tier client/server; 2) Business flexibility: modular services can be replaced or updated to meet changing business needs; 3) Technological flexibility: with an n-tier architecture, you can generally exchange database engines (minus trigger and stored procedure code) or port your middle tier to a different platform; 4) Lower long-term cost:you can save money by choosing commercial components or services, and by replacing only small modules rather than completeapplications. Answers A and D are incorrect because those models do not exist. The two-tier model is more appropriate forsolutions involving more narrowly-focused clients and resources, making Answer B incorrect.