Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorBill Pribyl

Oracle development tools come and go, but one of the few constants in the Oracle database environment is the PL/SQL programming language, which has been around for more than a decade. As Oracle's premier tool for building store procedures, PL/SQL uniquely supplements the standard relational database language, SQL, with the features needed to build real-world applications.Among our best-selling books on PL/SQL, Learning Oracle PL/SQL is the first one a newcomer to the language will want to read. Beginning with a discussion of what PL/SQL is and what it's good for, this book then presents language features, one at a time, in an engaging and readable way. A consistent and understandable example application-the development of a library's electronic catalog system-runs through the chapters.Topics include: * Why use PL/SQL at all? * Fundamental components of the language * Fast ways to read and write Oracle data * Organizing code for reusability * Using PL/SQL to generate web-based applications * Making sure your PL/SQL application is secure against hackers * Benefits of using third-party developer tools * Interacting with the internet (e.g., sending email from the database) * New PL/SQL features in Oracle9i Learning Oracle PL/SQL introduces PL/SQL in a way that's useful to a variety of audiences: beginning programmers, new Oracle database administrators, and developers familiar with other databases who now need to learn Oracle.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A beginner-friendly, example-driven introduction to Oracle PL/SQL that teaches you how to build real database applications—from basic language syntax to stored procedures, packages, and web integration—using a library catalog system as a running case study. Ideal for new programmers, Oracle DBAs, and developers coming from other databases. 【Book Arc】 - **Opening (~0%–9%)**: Sets the stage by explaining why PL/SQL matters, what it adds to plain SQL, and how the book's library catalog example will be used throughout. Also orients readers to the broader O'Reilly Oracle book family. - **Early (~9%–25%)**: Introduces the fundamental building blocks of PL/SQL—blocks, declarations, variables, datatypes, and basic program structure. The library example begins with a simple `return_book` procedure, showing how to declare parameters and handle defaults. - **Early–Middle (~25%–38%)**: Covers core language mechanics: loops (numeric FOR, cursor-FOR, simple/infinite), conditional logic, and the tricky behavior of NULL values. Emphasizes practical rules like using `NVL` to avoid null-poisoned arithmetic. - **Middle (~38%–47%)**: Moves into data manipulation and program design—writing procedures and functions that read and write Oracle data, validating inputs, and organizing code into packages with specifications and bodies. Highlights quirks like exception handling limitations in declaration sections. - **Late (~47%–end)**: Extends into advanced and practical topics: using PL/SQL for web-based applications, security against hackers, sending email from the database, and leveraging third-party tools. Also touches on Oracle9i-specific features. (Excerpts thin out here; later chapters are not fully covered in the sample.) 【Key Takeaways】 - **PL/SQL extends SQL with real programming power** (Early): It lets you build stored procedures, functions, and triggers that run inside the database—enabling custom logic, automation, and features like replication that are only accessible via PL/SQL. This is why learning it matters beyond just writing queries. - **The block is the fundamental unit** (Early): Every PL/SQL program is a block with three optional sections—declaration, execution, and exception handling. Only execution is mandatory. Nested blocks let you handle errors locally while continuing main processing. - **Variables default to NULL, and NULL is dangerous** (Early): Uninitialized variables are NULL, and any arithmetic with NULL yields NULL—not zero. The `NVL` function is your standard fix: `NVL(qty_on_hand, 0) + NVL(qty_sold, 0)` gives 451 instead of NULL. Remember this rule for all numeric operations. - **Loops come in three flavors** (Early): Numeric FOR loops iterate over a range, cursor-FOR loops fetch query results with minimal code, and simple (infinite) loops require explicit exit logic. Choose based on whether you know the count, need to process rows, or need maximum flexibility. - **Procedures and functions are the workhorses** (Middle): Procedures perform actions (like inserting a book), while functions return values (like counting copies). Use OUT parameters or function returns to send data back to callers. A key gotcha: exceptions raised during variable initialization in the declaration section cannot be caught by that block's exception handler. - **Packages organize code for reuse** (Middle): A package has a specification (public interface) and a body (implementation). The body must implement everything in the spec, but can also contain private programs used only internally. This is the standard way to build maintainable, modular PL/SQL applications. - **PL/SQL can power web apps and automation** (Late): The language supports generating web-based applications, sending email from the database, and trapping database events via triggers. These capabilities make PL/SQL valuable beyond traditional batch processing, though the excerpts provide limited detail on implementation. 【Reading Tips】 - **Skim the preface and early chapters** (~0%–9%) if you're already familiar with SQL or another programming language—they're motivational and contextual, not essential for coding. - **Deep-read the NULL and NVL sections** (~28%–38%): This is where beginners make the most mistakes. Work through the examples with a real Oracle instance to internalize the behavior. - **Pay close attention to the package chapter** (~44%–47%): The spec/body split is a core concept you'll use in every real project. The private-procedure example is worth replicating. - **Don't skip the exception-handling quirks** (~44%–47%): The declaration-section exception trap is a subtle bug source. Mark this page for future reference. - **Use the library catalog example as your practice project**: Rebuild each chapter's code as you go—it's designed to reinforce concepts incrementally, and the full code is available on the O'Reilly site. 【Coverage Limits】 This guide is based on excerpts covering roughly the first half of the book (through packages and procedures). Later topics—web applications, security, email integration, and Oracle9i features—are mentioned but not detailed in the source material.
Excerpt 1
acle's PL/SQL language in an easy-to-read format. Learning Examples Oracle PL/SQL will bring programmers up to speed on the Errata most important aspects of...
View in text
Excerpt 2
et File System or iFS, that are only available from Java.) Lessons From My Father on the "Best" Language Rewind to the last millennium, back when I was about...
View in text
Excerpt 3
hand, would not match the criteria: Starbeams, QUICKSTART, STANDARD. ● Does the string match the format for a U.S. Social Security number (NNN-NN-NNNN)? IF s...
View in text
Excerpt 4
tion CANNOT be || handled here! END; / The exact reason for this behavior is a bit complicated, so this is one of those quirks you might want to keep in mind...
View in text
Excerpt 5
er is to "publish it" using a web server like Apache. This involves putting the file into a special location on the machine running the web server. While thi...
View in text
Excerpt 6
records will match the where- clause, and you will see:[3] [3] If you've been reading closely, you may wonder why this operation results in a "1403" error in...
View in text
Excerpt 7
antial edge. If you want to hold off learning these topics until later, feel free to move on to Chapter 6 and return here at some future time. The topics are...
View in text
Excerpt 8
ned into a single call, as this fragment of a package body illustrates: PROCEDURE ut_betwnstr IS BEGIN utAssert.eq ('Typical valid usage', betwnstr(string_in...
View in text
Tags
AI categories
Programming LanguageDatabaseSQL
ISBN: 0596001800
Publisher: O'Reilly
Publish Year: 2002
Language: English
Pages: 524
File Format: PDF
File Size: 5.6 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…