Book description
For the past ten years, O'Reilly's Oracle PL/SQL Programming has been the bestselling book on PL/SQL, Oracle's powerful procedural language. Packed with examples and helpful recommendations, the book has helped everyone--from novices to experienced developers, and from Oracle Forms developers to database administrators--make the most of PL/SQL.
The fourth edition is a comprehensive update, adding significant new content and extending coverage to include the very latest Oracle version, Oracle Database 10g Release 2. It describes such new features as the PL/SQL optimizing compiler, conditional compilation, compile-time warnings, regular expressions, set operators for nested tables, nonsequential collections in FORALL, the programmer-defined quoting mechanism, the ability to backtrace an exception to a line number, a variety of new built-in packages, and support for IEEE 754 compliant floating-point numbers.
The new edition adds brand-new chapters on security (including encryption, row-level security, fine-grained auditing, and application contexts), file, email, and web I/O (including the built-in packages DBMS_OUTPUT, UTL_FILE, UTL_MAIL, UTL_SMTP, and UTL_HTTP) and globalization and localization.
Co-authored by the world's foremost PL/SQL authority, Steven Feuerstein, this classic reference provides language syntax, best practices, and extensive code, ranging from simple examples to complete applications--making it a must-have on your road to PL/SQL mastery. A companion web site contains many more examples and additional technical content for enhanced learning.
Publisher resources
Table of contents
- Oracle PL/SQL Programming, 4th Edition
- Dedication
- A Note Regarding Supplemental Files
- Preface
-
I. Programming in PL/SQL
-
1. Introduction to PL/SQL
- 1.1. What Is PL/SQL?
- 1.2. The Origins of PL/SQL
- 1.3. So This Is PL/SQL
-
1.4. About PL/SQL Versions
-
1.4.1. Oracle Database 10g New Features
- 1.4.1.1. Optimized compiler
- 1.4.1.2. Compile-time warnings
- 1.4.1.3. Conditional compilation
- 1.4.1.4. Support for nonsequential collections in FORALL
- 1.4.1.5. Improved datatype support
- 1.4.1.6. Backtrace an exception to its line number
- 1.4.1.7. Set operators for nested tables
- 1.4.1.8. Support for regular expressions
- 1.4.1.9. Programmer-defined quoting mechanism
- 1.4.1.10. Many new built-in packages
-
1.4.1. Oracle Database 10g New Features
- 1.5. Resources for PL/SQL Developers
- 1.6. Some Words of Advice
-
2. Creating and Running PL/SQL Code
- 2.1. SQL*Plus
- 2.2. Performing Essential PL/SQL Tasks
- 2.3. 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
- 6.1. Exception-Handling Concepts and Terminology
- 6.2. Defining Exceptions
- 6.3. Raising Exceptions
- 6.4. Handling Exceptions
- 6.5. Building an Effective Error Management Architecture
- 6.6. Making the Most of PL/SQL Error Management
-
III. PL/SQL Program Data
-
7. Working with Program Data
- 7.1. Naming Your Program Data
- 7.2. Overview of PL/SQL Datatypes
- 7.3. Declaring Program Data
- 7.4. Programmer-Defined Subtypes
- 7.5. Conversion Between Datatypes
-
8. Strings
- 8.1. String Datatypes
-
8.2. Working with Strings
- 8.2.1. Specifying String Constants
- 8.2.2. Using Nonprintable Characters
- 8.2.3. Concatenating Strings
- 8.2.4. Dealing with Case
- 8.2.5. Traditional Searching, Extracting, and Replacing
- 8.2.6. Padding
- 8.2.7. Trimming
- 8.2.8. Regular Expression Searching, Extracting, and Replacing
- 8.2.9. Working with Empty Strings
- 8.2.10. Mixing CHAR and VARCHAR2 Values
- 8.3. String Function Quick Reference
- 9. Numbers
-
10. Dates and Timestamps
- 10.1. Datetime Datatypes
- 10.2. Getting the Date and Time
- 10.3. Interval Datatypes
-
10.4. Datetime Conversions
- 10.4.1. From Strings to Datetimes
- 10.4.2. From Datetimes to Strings
- 10.4.3. Working with Time Zones
- 10.4.4. Requiring a Format Mask to Match Exactly
- 10.4.5. Easing Up on Exact Matches
- 10.4.6. Interpreting Two-Digit Years in a Sliding Window
- 10.4.7. Converting Time Zones to Character Strings
- 10.4.8. Padding Output with Fill Mode
- 10.5. Date and Timestamp Literals
- 10.6. Interval Conversions
- 10.7. Interval Literals
- 10.8. CAST and EXTRACT
- 10.9. Datetime Arithmetic
- 10.10. Date/Time Functions
- 11. Records
-
12. Collections
- 12.1. Collections Overview
- 12.2. Collection Methods (Built-Ins)
- 12.3. Working with Collections
- 12.4. Nested Table Multiset Operations
- 12.5. Maintaining Schema-Level Collections
-
13. Miscellaneous Datatypes
- 13.1. The BOOLEAN Datatype
- 13.2. The RAW Datatype
- 13.3. The UROWID and ROWID Datatypes
- 13.4. The LOB Datatypes
- 13.5. Working with LOBs
- 13.6. Predefined Object Types
-
7. Working with Program Data
-
IV. SQL in PL/SQL
-
14. DML and Transaction Management
- 14.1. DML in PL/SQL
- 14.2. Bulk DML with the FORALL Statement
- 14.3. Transaction Management
- 14.4. Autonomous Transactions
-
15. Data Retrieval
- 15.1. Cursor Basics
- 15.2. Working with Implicit Cursors
- 15.3. Working with Explicit Cursors
- 15.4. BULK COLLECT
- 15.5. SELECT ... FOR UPDATE
-
15.6. Cursor Variables and REF CURSORs
- 15.6.1. Why Cursor Variables?
- 15.6.2. Similarities to Static Cursors
- 15.6.3. Declaring REF CURSOR Types
- 15.6.4. Declaring Cursor Variables
- 15.6.5. Opening Cursor Variables
- 15.6.6. Fetching from Cursor Variables
- 15.6.7. Rules for Cursor Variables
- 15.6.8. Passing Cursor Variables as Arguments
- 15.6.9. Cursor Variable Restrictions
- 15.7. Cursor Expressions
-
16. Dynamic SQL and Dynamic PL/SQL
- 16.1. NDS Statements
- 16.2. Binding Variables
- 16.3. Working with Objects and Collections
- 16.4. Dynamic PL/SQL
- 16.5. Recommendations for NDS
- 16.6. When to Use DBMS_SQL
- 16.7. NDS Utility Package
-
14. DML and Transaction Management
-
V. PL/SQL Application Construction
-
17. Procedures, Functions, and Parameters
- 17.1. Modular Code
- 17.2. Procedures
- 17.3. Functions
- 17.4. Parameters
- 17.5. Local Modules
- 17.6. Module Overloading
- 17.7. Forward Declarations
- 17.8. Advanced Topics
- 17.9. Go Forth and Modularize!
- 18. Packages
-
19. Triggers
- 19.1. DML Triggers
- 19.2. DDL Triggers
- 19.3. Database Event Triggers
- 19.4. INSTEAD OF Triggers
- 19.5. AFTER SUSPEND Triggers
- 19.6. Maintaining Triggers
-
20. Managing PL/SQL Code
- 20.1. Managing Code in the Database
- 20.2. Using Native Compilation
-
20.3. Using the Optimizing Compiler and Compile-Time Warnings
- 20.3.1. The Optimizing Compiler
- 20.3.2. Compile-Time Warnings
-
20.3.3. Warnings Available in Oracle Database 10g
- 20.3.3.1. PLW-05000: mismatch in NOCOPY qualification between specification and body
- 20.3.3.2. PLW-05001: previous use of ’string’ (at line string) conflicts with this use
- 20.3.3.3. PLW-05003: same actual parameter(string and string) at IN and NOCOPY may have side effects
- 20.3.3.4. PLW-05004: identifier string is also declared in STANDARD or is a SQL built-in
- 20.3.3.5. PLW-05005: function string returns without value at line string
- 20.3.3.6. PLW-06002: unreachable code
- 20.3.3.7. PLW-07203: parameter ’string’ may benefit from use of the NOCOPY compiler hint
- 20.3.3.8. PLW-07204: conversion away from column type may result in sub-optimal query plan
- 20.4. Conditional Compilation
- 20.5. Testing PL/SQL Programs
- 20.6. Debugging PL/SQL Programs
-
20.7. Tuning PL/SQL Programs
- 20.7.1. Analyzing Performance of PL/SQL Code
-
20.7.2. Optimizing PL/SQL Performance
- 20.7.2.1. Use the most aggressive compiler optimization level possible
- 20.7.2.2. Use BULK COLLECT when querying multiple rows
- 20.7.2.3. Use FORALL when modifying multiple rows
- 20.7.2.4. Use the NOCOPY hint when passing large structures
- 20.7.2.5. Use PLS_INTEGER for intensive integer computations.
- 20.7.2.6. Use BINARY_FLOAT or BINARY_DOUBLE for floating-point arithmetic
- 20.7.2.7. Group together related programs in a package
- 20.7.2.8. Pin into shared memory large and frequently executed programs.
- 20.8. Protecting Stored Code
-
21. I/O and PL/SQL
- 21.1. Displaying Information
- 21.2. Reading and Writing Files
-
21.3. Sending Email
- 21.3.1. Oracle Prerequisites by Release
- 21.3.2. Send a Short (32K or Less) Plaintext Message
- 21.3.3. Include “Friendly” Names in Email Addresses
- 21.3.4. Send a Plaintext Message of Arbitrary Length
- 21.3.5. Send a Message with a Short (< 32K) Attachment
- 21.3.6. Send a Small File (< 32K) as an Attachment
- 21.3.7. Attach a File of Arbitrary Size
-
21.4. Working with Web-Based Data (HTTP)
- 21.4.1. Retrieve a Web Page in “Pieces”
- 21.4.2. Retrieve a Web Page into a LOB
- 21.4.3. Authenticate Using HTTP Username/Password
- 21.4.4. Retrieve an SSL-Encrypted Web Page (Via https)
- 21.4.5. Submit Data to a Web Page via GET or POST
- 21.4.6. Disable Cookies or Make Cookies Persistent
- 21.4.7. Retrieve Data from an FTP Server
- 21.4.8. Use a Proxy Server
- 21.5. Other Types of I/O Available in PL/SQL
-
17. Procedures, Functions, and Parameters
-
VI. Advanced PL/SQL Topics
-
22. Application Security and PL/SQL
- 22.1. Security Overview
-
22.2. Encryption
- 22.2.1. Key Length
- 22.2.2. Algorithms
- 22.2.3. Padding and Chaining
- 22.2.4. The DBMS_CRYPTO Package
- 22.2.5. Encrypting Data
- 22.2.6. Encrypting LOBs
- 22.2.7. Decrypting Data
- 22.2.8. Performing Key Generation
- 22.2.9. Performing Key Management
- 22.2.10. Cryptographic Hashing
- 22.2.11. Using Message Authentication Code
- 22.2.12. Using Transparent Data Encryption (TDE)
- 22.3. Row-Level Security
- 22.4. Application Contexts
- 22.5. Fine-Grained Auditing
-
23. Inside PL/SQL
- 23.1. Looking Under the Hood
- 23.2. PL/SQL’s Optimizing Compiler
- 23.3. Dependency Management
- 23.4. Execution Authority Models
- 23.5. PL/SQL and Oracle Memory
- 23.6. Server-Side PL/SQL Processing: Reprise
- 23.7. What You Need to Know
-
24. Globalization and Localization in PL/SQL
- 24.1. Overview and Terminology
- 24.2. Unicode Primer
- 24.3. Character Semantics
- 24.4. String Sort Order
- 24.5. Multilingual Information Retrieval
- 24.6. Date/Time
- 24.7. Currency Conversion
- 24.8. Globalization Development Kit for PL/SQL
-
25. Object-Oriented Aspects of PL/SQL
- 25.1. Introduction to Oracle’s Object Features
- 25.2. An Extended Example
- 25.3. Object Views
- 25.4. Maintaining Object Types and Object Views
- 25.5. Pontifications
- 26. Calling Java from PL/SQL
-
27. External Procedures
- 27.1. Introduction to External Procedures
- 27.2. The Oracle Net Configuration
- 27.3. Setting Up Multithreaded Mode
- 27.4. Creating an Oracle Library
- 27.5. Writing the Call Specification
- 27.6. Raising an Exception from the Called C Program
- 27.7. Nondefault Agents
- 27.8. Maintaining External Procedures
-
22. Application Security and PL/SQL
- VII. Appendixes
- About the Authors
- Colophon
- Copyright
Product information
- Title: Oracle PL/SQL Programming, 4th Edition
- Author(s):
- Release date: August 2005
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596009779
You might also like
book
Oracle PL/SQL Programming, Third Edition
Nearly a quarter-million PL/SQL programmers--novices and experienced developers alike--have found the first and second editions of …
book
Oracle PL/SQL Programming, 5th Edition
This book is the definitive reference on PL/SQL, considered throughout the database community to be the …
book
Oracle PL/SQL Programming, 6th Edition
Considered the best Oracle PL/SQL programming guide by the Oracle community, this definitive guide is precisely …
book
Oracle PL/SQL For Dummies
Find tips for creating efficient PL/SQL code If you know a bit about SQL, this book …