Expert Oracle JDBC Programming

Front Cover
Apress, Nov 1, 2006 - Computers - 744 pages

JDBC is the most commonly used API in Java to access and manipulate data in a database. Oracle is one of the most popular and scalable databases in the world. This book is a must-have for any developer building an application that employs JDBC on Oracle database. Unlike other JDBC books, this book has been written to complement not rehash the contents of Oracle JDBC documentation and the JDBC specification.

The book teaches you not just how to write JDBC code, but how to write effective JDBC code in a step-by-step fashion. This book does not assume any prior knowledge of JDBC, though it does assume basic knowledge of SQL and PL/SQL. It covers JDBC with a focus on writing high-performing, scalable and secure applications for Oracle 10g and 9i.

 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Contents

Weakly Typed Struct Objects
324
Performing DML Operations Using Struct Objects
327
Note Due to a bug executing a stored procedure and
329
Summary
344
Using Strongly Typed
345
An Introduction to JPublisher
346
Using the SQLData Interface
352
init_struct true
375

Note You can set CURSOR_SHARING to SIMILAR or FORCE to
45
wwwhotsoscomdownloadsregistered00000006pdf for an excellent article on
46
Note Well look at many more reasons to use PLSQL
59
Tip In general a SQL solution will outperform a PLSQL
64
Summary
77
Introduction to JDBC
79
JDBC Driver Types
80
Choosing the Right Driver
82
Tip For more information on the different files used by
84
Connecting to a Database
89
For running the example in this section you will need
103
Introducing JDBCUtil
111
Summary
113
Transactions
115
Rolling Back a Transaction
116
Note In 10g Release 1 and 9i Release 2 the
124
Note Savepoints have been around for quite some time in
131
Summary
138
Statement and
139
Overview of How Oracle Processes
140
Connection ResultSet and Statement Interfaces
142
The Statement Interface
144
Caution As you may have already guessed using the Statement
145
The PreparedStatement Interface
150
Update Batching
167
Summary
185
CallableStatement
187
Where Should Your SQL Statements Reside
204
Note If the external data source is visible to the
207
Result Sets Explored
209
Handling Null Values
210
Note As mentioned earlier regardless of the fetch size you
214
the section Paginating Through a Result Set you can use
233
Positioning in a Scrollable Result Set
236
Note Attempting to move forward beyond the last row will
237
Note Since a deleted row will not get selected if
249
A Result Sets Ability to Detect Database Changes
252
Dynamically Building a Query with an Unknown
259
ResultSetMetaData
269
DatabaseMetaData
273
Introducing Oracle Objects and Collections
278
Using Objects As Programming Constructs
287
Using Objects to Store Data Not Recommended
289
Caution Use of instead of triggers on object views can
305
Object Views vs Nested Tables vs Relational Tables
313
Summary
321
Using Weakly Typed
323
SQLData vs ORAData and ORADataFactory
384
A Note on Separating Domain Objects
385
Using Oracle Collections
387
Weakly Typed Collection Classes
388
Strongly Typed Collection Classes
390
Materializing Collections of Object Types
407
Caution There is a bug in 10g Release 1 and
423
Note For more background on references I refer you to
430
Using LOBs and BFILEs
447
Internal LOBs CLOBs NCLOBs and BLOBs
449
External LOBs BFILEs in SQL and PLSQL
457
Note If you want to create a directory object with
458
Using LOBs in JDBC
459
Alternatives to BFILEs for File Operations
480
Summary
493
Statement Caching
495
Prepare Once Bind and Execute Many Times
500
Session Cursor Cache and Softer Soft Parses
504
Note As of Oracle 10g Release 1 the PLSQL cursor
509
Caution When you retrieve an explicitly cached statement make sure
524
Session Cursor Cache vs PLSQL Cursor
527
Summary
528
Connection Pooling
529
Three Sessions Sharing a Single Connection
530
ClientServer Applications and Connections
531
Web Applications and
532
Oracle9i Connection Pooling Framework
536
Connection Pooling Interfaces and Oracle Implementation
537
Note The concept of connection caching is not relevant to
541
Oracle 10g Implicit Connection Caching
547
Note For some reason Oracle treats the autocommit attribute of
560
Summary
573
SecurityRelated Issues
575
Mapping an End User to a Database User
576
Separating the End User Database Schema
578
An Example Application
579
Note that we need to give some quota on a
581
Authenticating an Application End User to the
587
Summary
598
LockingRelated Issues
599
Summary
628
Selected PLSQL Techniques
629
Selected PLSQL Tips
635
Note All SQL submitted from JDBC is dynamic This is
653
Summary
687
Copyright

Other editions - View all

Common terms and phrases

Popular passages

Page 12 - Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production Export file created by EXPORT :V09.
Page 14 - Statistics 0 recursive calls 4 db block gets 5 consistent gets 0 physical reads 0 redo size 368 bytes sent via SQL*Net to client 425 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed So what are some things to look for in terms of rewriting SQL?
Page xxvii - On a personal note, I would like to express my deepest gratitude to my family and friends.
Page 20 - Misses in library cache during parse: 0 Optimizer goal: CHOOSE Parsing user id...

About the author (2006)

R.M. Menon has worked with Oracle database for over 11 years, eight of which have been at Oracle Corporation. Menon works as a project lead in the core technology division of Oracle. For the past five years, Menon has used JDBC and other J2EE technologies extensively as part of his work. He believes in the philosophy of proving all assertions, and has strived to follow this philosophy rigorously in his book. When he is not doing research on Oracle, Menon learns Indian classical vocal music and performs at local cultural events as a singer. Occasionally, he also dabbles in sketching portraits, and drawing paintings and cartoons.

Bibliographic information