Chapter 13: Statement Caching
In this chapter, you’ll learn about statement caching, its different flavors in JDBC, and how it
improves the performance of JDBC programs. As a background to the statement-caching con-
cept, you’ll also examine cursors and ref cursors in detail. In addition, you’ll look at two other
related caches Oracle provides you with: the PL/SQL cursor cache (which is the PL/SQL equiv-
alent of the JDBC statement cache) and session cached cursors.
Chapter 14: Connection Pooling and Caching
In this chapter, you’ll learn about connection pooling and caching, and how they can improve
the performance of your application. You’ll look at the 9i and 10g implementations separately.
Finally, you’ll examine Oracle’s OCI driver connection pooling feature.
Chapter 15: Security-Related Issues
This chapter examines some of the security issues involved in a three-tier architecture that uses
connection pooling. In particular, it delves into various alternatives of mapping an application
end user to a database end user, and different ways in which an application can authenticate to
the database on behalf of an end user. You’ll also learn about the proxy authentication feature.
Chapter 16: Locking-Related Issues
In this chapter, you’ll look at some of the issues related to locking in Oracle. In particular, you’ll
learn about the infamous lost update problem and various ways to address it. Along the way,
you’ll examine different strategies to implement two solutions to the lost update problem,
namely optimistic locking and pessimistic locking. You’ll also compare these two solutions
and determine when to use each strategy.
Chapter 17: Selected PL/SQL Techniques
In the final chapter, you’ll learn why it is critical for a JDBC programmer working with Oracle
databases to learn and master PL/SQL. You’ll also examine a few selected PL/SQL techniques
that will help you in writing high-performance and maintainable PL/SQL code.
Appendix
The Appendix includes two reference tables that list mappings between SQL object types and
Java types.
Recommended Reading Order
The book is best read in sequential order. If you do want some flexibility in the order in which
you read the book, then please follow these guidelines.
To begin with, I recommend you read Chapters 1 through 7 in sequential order. The remain-
der of the book is divided into two (more or less) self-contained parts. The first part consists of
Chapters 8 through 11, which describe Oracle objects and how to use them in JDBC. You should
read these chapters in sequential order. The second part consists of Chapters 12 through 17,
which are fairly self-contained and can be read in any order, except for the fact that you may
want to read Chapter 13 before Chapter 14.
■INTRODUCTIONxxvi