
Oracle 9i Java Programming: Solutions for Developers Using PL/SQL / Edition 1
by HOLM, Sant K. Singh, Kevin MukharISBN-10: 1861006020
ISBN-13: 9781861006028
Pub. Date: 12/23/2001
Publisher: Apress
Overview
While the integration of a Java Virtual Machine into the Oracle database has provided a whole host of new opportunities and challenges to the Oracle developer and DBA, it has also provoked much debate as to when it makes sense to exploit this feature. This book clearly demonstrates many practical, real-world applications that developers can put to immediate use in their day-to-day jobs. With Java and Oracle, the developer can now compress LOBs, use multicast sockets to automatically alert clients when data has changed, and run an FTP Java client in the database, to name but a few of the examples covered here. In addition, this book gives in-depth consideration to the question of when it is appropriate to use Java from a performance perspective, including benchmarks.
Product Details
- ISBN-13:
- 9781861006028
- Publisher:
- Apress
- Publication date:
- 12/23/2001
- Series:
- SkipSearch
- Edition description:
- 2001
- Pages:
- 825
- Product dimensions:
- 0.00(w) x 0.00(h) x 0.07(d)
Table of Contents
Introduction | 1 | |
From the Lead Author... | 2 | |
Who Should use this Book? | 2 | |
How this Book is Structured | 2 | |
Conventions | 5 | |
Customer Support | 6 | |
How to Download the Sample Code for the Book | 7 | |
Errata | 7 | |
E-mail Support | 7 | |
P2p.wrox.com | 8 | |
Section 1 | Basic Java for Oracle Developers | |
Chapter 1 | Getting Started | 11 |
Setting Up | 11 | |
Java Architecture | 16 | |
The Oracle Java Server Platform | 19 | |
Running Java Programs in the Database | 22 | |
Summary | 30 | |
Chapter 2 | Java Classes and Objects | 33 |
Making and Using Classes and Objects | 34 | |
Inheritance | 46 | |
Packages | 59 | |
The public, private, protected Keywords | 63 | |
Exceptions | 65 | |
Core Java Classes | 66 | |
Summary | 68 | |
Chapter 3 | Using Objects in PL/SQL and Java | 71 |
Procedural Approach: the PL/SQL Account package | 71 | |
OO Approach: the Account Java Class | 73 | |
Constructors in Java | 73 | |
Setting up Variables in Java and PL/SQL | 74 | |
Custom and Abstract Data Types | 76 | |
Passing Parameters and Returning Values | 79 | |
Calling Java from PL/SQL | 80 | |
Comparing Java Classes and PL/SQL Packages | 82 | |
Comparing Java Methods and PL/SQL Procedures | 85 | |
Object-Oriented Features in PL/SQL and Java | 86 | |
Summary | 94 | |
Section 2 | JDBC and SQLJ | |
Chapter 4 | Connecting to Oracle through JDBC | 97 |
JDBC Fundamentals | 98 | |
How JDBC Works | 101 | |
JDBC Drivers | 102 | |
Connecting to Oracle | 107 | |
Oracle JDBC Connections | 108 | |
A Basic JDBC Application | 113 | |
Solution to Common Problems | 118 | |
The Server-Side Internal Driver | 120 | |
Summary | 124 | |
Chapter 5 | Using JDBC | 127 |
What Else is in the JDBC API? | 128 | |
A Tour of the Main JDBC Interfaces | 128 | |
Multiple Fetching | 161 | |
Defining Column Types | 167 | |
Transactions | 168 | |
More Go-Faster Code: Update Batching | 172 | |
Designing for Performance | 181 | |
Summary | 184 | |
Chapter 6 | Handling Exceptions | 187 |
Exception Fundamentals | 188 | |
JDBC Exceptions | 194 | |
Now That You've Caught One... | 204 | |
Summary | 206 | |
Chapter 7 | Oracle Extension Classes | 209 |
Benefits of JDBC Extensions | 210 | |
Oracle JDBC Packages | 210 | |
The STRUCT and ARRAY Data Types | 212 | |
The oracle.sql.REF class | 226 | |
The BLOB and CLOB Classes | 230 | |
The oracle.sql.BFILE Class | 238 | |
The oracle.sql.CHAR Class | 244 | |
The oracle.sql.DATE class | 245 | |
The oracle.sql.NUMBER Class | 246 | |
Summary | 247 | |
Chapter 8 | SQLJ Programming | 249 |
SQLJ--A Short History | 250 | |
The SQLJ Translation Process | 251 | |
Preparing the Code Examples | 252 | |
A Simple SELECT Statement | 252 | |
Manipulating Data with SQLJ | 269 | |
SQLJ Declarations | 278 | |
Using SQLJ to Invoke PL/SQL | 294 | |
SQLJ and Java Stored Procedures | 300 | |
New SQLJ Features in Oracle 9i | 305 | |
Summary | 311 | |
Section 3 | Using Java in the Database | |
Chapter 9 | Using the oracle JVM | 315 |
Historical Differences in the Oracle JVM | 315 | |
Memory Usage in the JVM | 317 | |
Managing Code in the JVM | 323 | |
Debugging and Common Pitfalls | 340 | |
Summary | 350 | |
Chapter 10 | Java Stored Procedure Basics | 353 |
Why use Java Stored Procedures? | 353 | |
An Overview of Java Stored Procedure Development | 354 | |
Executing Parameterless Java Methods | 355 | |
Java Methods that take Parameters | 359 | |
Calling Java Stored Procedures from SQL DML | 362 | |
The Time Translator Java Stored Procedure | 364 | |
The e-mail Validation Stored Procedure | 368 | |
Summary | 369 | |
Chapter 11 | Oracle Java Security | 371 |
Security Basics | 371 | |
Java Security Model | 372 | |
Oracle Java Security | 385 | |
Summary | 423 | |
Chapter 12 | Using Java Utilities | 425 |
Defining the Role of Java | 426 | |
Java Utilities | 427 | |
Generating Images | 428 | |
Sending e-Mail Messages from the Database | 456 | |
Tying it All Together | 468 | |
Summary | 470 | |
Chapter 13 | Working with Operating System Resources | 473 |
Guidelines for Resource Handling | 474 | |
Java and Files | 475 | |
Running OS Commands and Executables | 500 | |
Sockets | 530 | |
Summary | 544 | |
Chapter 14 | Using PL/SQL and Java Together | 547 |
File Transfer Application | 547 | |
Data Compression | 583 | |
Summary | 599 | |
Section 4 | Performance | |
Chapter 15 | Java Application Performance | 601 |
Object Creation and Performance | 602 | |
Java Memory Usage In The Database | 610 | |
JDBC Driver Comparisons | 622 | |
Oracle Native Compiler (ncomp) | 632 | |
Summary | 642 | |
Chapter 16 | SQL Tuning and Analyzing Queries | 645 |
First Steps In SQL Tuning | 646 | |
Analyzing Queries | 663 | |
Advanced SQL Tuning | 674 | |
Summary | 689 | |
Chapter 17 | PL/SQL and Java: Benchmarking SQL Execution | 691 |
Comparing PL/SQL and JDBC | 693 | |
The Price of Data Conversion | 715 | |
The Design Factor | 727 | |
Summary | 728 | |
Section 5 | Appendices | |
Appendix A | Basic Java Syntax | 731 |
Basic Java Program Structure | 731 | |
Variables | 737 | |
The Primitive Data Types | 741 | |
Operators | 743 | |
Character Data Types | 751 | |
Strings | 752 | |
Control Structures | 754 | |
Arrays | 768 | |
Appendix B | Useful Core Java Classes | 773 |
Java API Specification | 774 | |
Mathematical Operations | 774 | |
Formatting Operations | 784 | |
The Collections API | 793 | |
Input and Output | 800 | |
Properties | 813 | |
Summary | 816 | |
Appendix C | The Logging API | 819 |
Setting up the Java Logging API | 819 | |
Index | 825 |
Customer Reviews
Average Review: