Book description
This book is the definitive reference on PL/SQL, considered throughout the database community to be the best Oracle programming book available. Like its predecessors, this fifth edition of Oracle PL/SQL Programming covers language fundamentals, advanced coding techniques, and best practices for using Oracle's powerful procedural language. Thoroughly updated for Oracle Database 11g Release 2, this edition reveals new PL/SQL features and provides extensive code samples, ranging from simple examples to complex and complete applications, in the book and on the companion website.
This indispensable reference for both novices and experienced Oracle programmers will help you:
- Get PL/SQL programs up and running quickly, with clear instructions for executing, tracing, testing, debugging, and managing PL/SQL code
- Optimize PL/SQL performance with the aid of a brand-new chapter in the fifth edition
- Explore datatypes, conditional and sequential control statements, loops, exception handling, security features, globalization and localization issues, and the PL/SQL architecture
- Understand and use new Oracle Database 11g features, including the edition-based redefinition capability, the function result cache, the new CONTINUE statement, fine-grained dependency tracking, sequences in PL/SQL expressions, supertype invocation from subtypes, and enhancements to native compilation, triggers, and dynamic SQL
- Use new Oracle Database 11g tools and techniques such as PL/Scope, the PL/SQL hierarchical profiler, and the SecureFiles technology for large objects
- Build modular PL/SQL applications using procedures, functions, triggers, and packages
Table of contents
- Oracle PL/SQL Programming
- Dedication
- A Note Regarding Supplemental Files
- Preface
-
I. Programming in PL/SQL
-
1. Introduction to PL/SQL
- What Is PL/SQL?
- The Origins of PL/SQL
- So This Is PL/SQL
-
About PL/SQL Versions
-
Oracle Database 11g New Features
- Edition-based redefinition capability (Release 2 only)
- FORCE option with CREATE TYPE (Release 2 only)
- Function result cache
- CONTINUE statement
- Sequences in PL/SQL expressions
- Dynamic SQL enhancements
- New native compilation and SIMPLE datatypes
- SecureFiles
- Trigger enhancements
- Automatic subprogram inlining
- PL/Scope
- PL/SQL hierarchical profiler
- Fine-grained dependency tracking
- Supertype invocation from subtype
-
Oracle Database 11g New Features
- Resources for PL/SQL Developers
- Some Words of Advice
-
2. Creating and Running PL/SQL Code
- Navigating the Database
- Creating and Editing Source Code
- SQL*Plus
- Performing Essential PL/SQL Tasks
- Editing Environments for PL/SQL
- Calling PL/SQL from Other Languages
- 3. Language Fundamentals
-
1. Introduction to PL/SQL
-
II. PL/SQL Program Structure
- 4. Conditional and Sequential Control
- 5. Iterative Processing with Loops
-
6. Exception Handlers
- Exception-Handling Concepts and Terminology
- Defining Exceptions
- Raising Exceptions
- Handling Exceptions
- Building an Effective Error Management Architecture
- Making the Most of PL/SQL Error Management
-
III. PL/SQL Program Data
- 7. Working with Program Data
-
8. Strings
- String Datatypes
- Working with Strings
- String Function Quick Reference
- 9. Numbers
- 10. Dates and Timestamps
- 11. Records
-
12. Collections
- Collections Overview
- Collection Methods (Built-ins)
- Working with Collections
- Nested Table Multiset Operations
- Maintaining Schema-Level Collections
-
13. Miscellaneous Datatypes
- The BOOLEAN Datatype
- The RAW Datatype
- The UROWID and ROWID Datatypes
- The LOB Datatypes
- Working with LOBs
- Predefined Object Types
-
IV. SQL in PL/SQL
- 14. DML and Transaction Management
-
15. Data Retrieval
- Cursor Basics
- Working with Implicit Cursors
- Working with Explicit Cursors
- SELECT...FOR UPDATE
- Cursor Variables and REF CURSORs
- Cursor Expressions
-
16. Dynamic SQL and Dynamic PL/SQL
- NDS Statements
- Binding Variables
- Working with Objects and Collections
- Dynamic PL/SQL
- Recommendations for NDS
- When to Use DBMS_SQL
- Oracle Database 11g New Features
-
V. PL/SQL Application Construction
- 17. Procedures, Functions, and Parameters
- 18. Packages
-
19. Triggers
- DML Triggers
- DDL Triggers
- Database Event Triggers
- INSTEAD OF Triggers
- AFTER SUSPEND Triggers
- Maintaining Triggers
-
20. Managing PL/SQL Code
-
Managing Code in the Database
- Overview of Data Dictionary Views
- Display Information About Stored Objects
- Display and Search Source Code
- Use Program Size to Determine Pinning Requirements
- Obtain Properties of Stored Code
- Analyze and Modify Trigger State Through Views
- Analyze Argument Information
- Analyze Identifier Usage (Oracle Database 11g’s PL/Scope)
- Managing Dependencies and Recompiling Code
-
Compile-Time Warnings
- A Quick Example
- Enabling Compile-Time Warnings
-
Some Handy Warnings
- PLW-05000: Mismatch in NOCOPY qualification between specification and body
- PLW-05001: Previous use of ’string’ (at line string) conflicts with this use
- PLW-05003: Same actual parameter (string and string) at IN and NOCOPY may have side effects
- PLW-05004: Identifier string is also declared in STANDARD or is a SQL built-in
- PLW-05005: Function string returns without value at line string
- PLW-06002: Unreachable code
- PLW-07203: Parameter ’string’ may benefit from use of the NOCOPY compiler hint
- PLW-07204: Conversion away from column type may result in suboptimal query plan
- PLW-06009: Procedure “string” OTHERS handler does not end in RAISE or RAISE_APPLICATION_ERROR (Oracle Database 11g)
- Testing PL/SQL Programs
- Tracing PL/SQL Execution
- Debugging PL/SQL Programs
- Protecting Stored Code
- Introduction to Edition-Based Redefinition (Oracle Database 11g Release 2)
-
Managing Code in the Database
-
21. Optimizing PL/SQL Performance
- Tools to Assist in Optimization
- The Optimizing Compiler
-
Data Caching Techniques
- Package-Based Caching
- Deterministic Function Caching
-
Function Result Cache (Oracle Database 11g)
- How to use the function result cache
- The RELIES_ON clause
- Function result cache example: A deterministic function
- Function result cache example: Querying data from a table
- Function result cache example: Caching a collection
- When to use the function result cache
- When not to use the function result cache
- Useful details of function result cache behavior
- Managing the function result cache
- The Virtual Private Database and function result caching
- Caching Summary
- Bulk Processing for Multirow SQL
-
Improving Performance With Pipelined Table Functions
- Replacing Row-Based Inserts with Pipelined Function-Based Loads
- Tuning Merge Operations with Pipelined Functions
- Asynchronous Data Unloading with Parallel Pipelined Functions
- Performance Implications of Partitioning and Streaming Clauses in Parallel Pipelined Functions
- Pipelined Functions and the Cost-Based Optimizer
- Tuning Complex Data Loads with Pipelined Functions
- A Final Word on Pipelined Functions
- Specialized Optimization Techniques
- Stepping Back for the Big Picture on Performance
-
22. I/O and PL/SQL
- Displaying Information
- Reading and Writing Files
-
Sending Email
- Oracle Prerequisites
- Configuring Network Security
- Send a Short (32,767 or Less) Plaintext Message
- Include “Friendly” Names in Email Addresses
- Send a Plaintext Message of Arbitrary Length
- Send a Message with a Short (< 32,767) Attachment
- Send a Small File (< 32767) as an Attachment
- Attach a File of Arbitrary Size
- Working with Web-Based Data (HTTP)
- Other Types of I/O Available in PL/SQL
-
VI. Advanced PL/SQL Topics
-
23. Application Security and PL/SQL
- Security Overview
-
Encryption
- Key Length
- Algorithms
- Padding and Chaining
- The DBMS_CRYPTO Package
- Encrypting Data
- Encrypting LOBs
- SecureFiles
- Decrypting Data
- Performing Key Generation
- Performing Key Management
- Cryptographic Hashing
- Using Message Authentication Codes
- Using Transparent Data Encryption (TDE)
- Transparent Tablespace Encryption
- Row-Level Security
- Application Contexts
- Fine-Grained Auditing
-
24. PL/SQL Architecture
- Who (or What) is DIANA?
- How Does Oracle Execute PL/SQL Code?
- The Default Packages of PL/SQL
- Execution Authority Models
- Conditional Compilation
- PL/SQL and Database Instance Memory
- Native Compilation
- What You Need to Know
- 25. Globalization and Localization in PL/SQL
-
26. Object-Oriented Aspects of PL/SQL
- Introduction to Oracle’s Object Features
- Object Types by Example
- Object Views
- Maintaining Object Types and Object Views
- Concluding Thoughts from a (Mostly) Relational Developer
- 27. Calling Java from PL/SQL
- 28. External Procedures
-
23. Application Security and PL/SQL
- A. Regular Expression Metacharacters and Function Parameters
- B. Number Format Models
- C. Date Format Models
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Oracle PL/SQL Programming, 5th Edition
- Author(s):
- Release date: September 2009
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596514464
You might also like
book
Domain-Driven Design: Tackling Complexity in the Heart of Software
“Eric Evans has written a fantastic book on how you can make the design of your …
book
Tidy First?
Messy code is a nuisance. "Tidying" code, to make it more readable, requires breaking it up …
book
The Complete Coding Interview Guide in Java
Explore a wide variety of popular interview questions and learn various techniques for breaking down tricky …
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …