Oracle PL/SQL by Example, 4/e (Paperback)
暫譯: Oracle PL/SQL 實例解析,第4版 (平裝本)

Benjamin Rosenzweig, Elena Rakhimov

  • 出版商: Prentice Hall
  • 出版日期: 2008-08-01
  • 售價: $2,750
  • 貴賓價: 9.5$2,613
  • 語言: 英文
  • 頁數: 768
  • 裝訂: Paperback
  • ISBN: 0137144229
  • ISBN-13: 9780137144228
  • 相關分類: OracleSQL
  • 已過版

買這商品的人也買了...

商品描述

This integrated learning solution teaches all the Oracle PL/SQL skills you need, hands-on, through real-world labs, extensive examples, exercises, and projects! Completely updated for Oracle 11g, Oracle PL/SQL by Example, Fourth Edition covers all the fundamentals, from PL/SQL syntax and program control through packages and Oracle 11g’s significantly improved triggers.

 

One step at a time, you’ll walk through every key task, discovering the most important PL/SQL programming techniques on your own. Building on your hands-on learning, the authors share solutions that offer deeper insights and proven best practices. End-of-chapter projects bring together all the techniques you’ve learned, strengthening your understanding through real-world practice.

 

This book’s approach fully reflects the authors’ award-winning experience teaching PL/SQL programming to professionals at Columbia University. New database developers and DBAs can use its step-by-step instructions to get productive fast; experienced PL/SQL programmers can use this book as a practical solutions reference. Coverage includes

        • Mastering basic PL/SQL concepts and general programming language fundamentals, and understanding SQL’s role in

          PL/SQL

        • Using conditional and iterative program control techniques, including the new CONTINUE and CONTINUE WHEN statements

        • Efficiently handling errors and exceptions

        • Working with cursors and triggers, including Oracle 11g’s powerful new compound triggers

        • Using stored procedures, functions, and packages to write modular code that other programs can execute

        • Working with collections, object-relational features, native dynamic SQL, bulk SQL, and other advanced PL/SQL capabilities

        • Handy reference appendices: PL/SQL formatting guide, sample database schema, ANSI SQL standards reference, and

          more

 

Benjamin Rosenzweig is a Software Development Manager at Misys. Previously he was a Principal Consultant at Oracle. His experience ranges from creating an electronic Tibetan—English Dictionary in Kathmandu, Nepal, to supporting presentation centers at Goldman Sachs and managing trading systems at TIAA-CREF. As an instructor at Columbia University’s Computer Technology and Application Program, he was awarded the Outstanding Teaching Award. Rosenzweig wrote and presented Oracle Forms Developer: The Complete Video Course, and coauthored Oracle Web Application Programming for PL/SQL Developers.

 

Elena Silvestrova Rakhimov is Senior Developer and Team Lead at Alea Software. She has more than fifteen years of experience in database development in a wide spectrum of enterprise and business environments, ranging from non-profit organizations to Wall Street. She has taught database programming at Columbia University.

 

Contents

Acknowledgments xiv

About the Authors xv

Introduction xvii

 

CHAPTER 1 PL/SQL Concepts 1

    LAB 1.1 PL/SQL in Client/Server Architecture 2

        1.1.1 Use PL/SQL Anonymous Blocks 8

        1.1.2 Understand How PL/SQL Gets Executed 10

    LAB 1.2 PL/SQL in SQL*Plus 12

        1.2.1 Use Substitution Variables 16

        1.2.2 Use the DBMS_OUTPUT.PUT_LINE Statement 17

Chapter 1 Try It Yourself 19

 

CHAPTER 2 General Programming Language

Fundamentals 21

    LAB 2.1 PL/SQL Programming Fundamentals 22

        2.1.1 Make Use of PL/SQL Language Components 23

        2.1.2 Make Use of PL/SQL Variables 24

        2.1.3 Handle PL/SQL Reserved Words 26

        2.1.4 Make Use of Identifiers in PL/SQL 27

        2.1.5 Make Use of Anchored Datatypes 28

        2.1.6 Declare and Initialize Variables 31

        2.1.7 Understand the Scope of a Block, Nested Blocks, and Labels 34

Chapter 2 Try It Yourself 37

 

CHAPTER 3 SQL in PL/SQL 39

    LAB 3.1 Making Use of DML in PL/SQL 40

        3.1.1 Use the Select INTO Syntax for Variable Initialization 41

        3.1.2 Use DML in a PL/SQL Block 42

        3.1.3 Make Use of a Sequence in a PL/SQL Block 44

    LAB 3.2 Making Use of SAVEPOINT 45

        3.2.1 Make Use of COMMIT, ROLLBACK, and SAVEPOINT in a PL/SQL Block 48

Chapter 3 Try It Yourself 51

 

CHAPTER 4 Conditional Control: IF Statements 53

    LAB 4.1 IF Statements 54

        4.1.1 Use the IF-THEN Statement 58

        4.1.2 Use the IF-THEN-ELSE Statement 62

    LAB 4.2 ELSIF Statements 65

        4.2.1 Use the ELSIF Statement 69

    LAB 4.3 Nested IF Statements 74

        4.3.1 Use Nested IF Statements 76

Chapter 4 Try It Yourself 80

 

CHAPTER 5 Conditional Control: CASE Statements 81

    LAB 5.1 CASE Statements 82

        5.1.1 Use the CASE Statement 89

        5.1.2 Use the Searched CASE Statement 91

    LAB 5.2 CASE Expressions 96

        5.2.1 Use the CASE Expression 100

    LAB 5.3 NULLIF and COALESCE Functions 103

        5.3.1 The NULLIF Function 107

        5.3.2 Use the COALESCE Function 109

Chapter 5 Try It Yourself 112

 

CHAPTER 6 Iterative Control: Part I 113

    LAB 6.1 Simple Loops 114

        6.1.1 Use Simple Loops with EXIT Conditions 118

        6.1.2 Use Simple Loops with EXIT WHEN Conditions 120

    LAB 6.2 WHILE Loops 124

        6.2.1 Use WHILE Loops 128

    LAB 6.3 Numeric FOR Loops 132

        6.3.1 Use Numeric FOR Loops with the IN Option 137

        6.3.2 Use Numeric FOR Loops with the REVERSE Option 139

Chapter 6 Try It Yourself 142

 

CHAPTER 7 Iterative Control: Part II 143

    LAB 7.1 The CONTINUE Statement 144

        7.1.1 Use t...

商品描述(中文翻譯)

這個綜合學習解決方案透過實際的實驗室、廣泛的範例、練習和專案,手把手教導您所需的所有 Oracle PL/SQL 技能!本書完全更新至 Oracle 11g,第四版的《Oracle PL/SQL by Example》涵蓋了所有基本概念,從 PL/SQL 語法和程式控制到套件以及 Oracle 11g 顯著改進的觸發器。

一步一步地,您將逐步完成每個關鍵任務,自己發現最重要的 PL/SQL 程式設計技術。在實踐學習的基礎上,作者分享提供更深入見解和經過驗證的最佳實踐的解決方案。每章結尾的專案將您所學的所有技術整合在一起,透過實際操作加強您的理解。

本書的教學方法充分反映了作者在哥倫比亞大學教授 PL/SQL 程式設計的獲獎經驗。新手資料庫開發者和 DBA 可以利用其逐步指導快速提高生產力;有經驗的 PL/SQL 程式設計師則可以將本書作為實用的解決方案參考。內容包括:

• 掌握基本的 PL/SQL 概念和一般程式語言基礎,理解 SQL 在 PL/SQL 中的角色
• 使用條件和迭代程式控制技術,包括新的 CONTINUE 和 CONTINUE WHEN 語句
• 高效處理錯誤和例外
• 使用游標和觸發器,包括 Oracle 11g 強大的新複合觸發器
• 使用儲存過程、函數和套件撰寫其他程式可以執行的模組化程式碼
• 使用集合、物件關聯特性、原生動態 SQL、大量 SQL 和其他高級 PL/SQL 功能
• 方便的參考附錄:PL/SQL 格式指南、範例資料庫架構、ANSI SQL 標準參考等

Benjamin Rosenzweig 是 Misys 的軟體開發經理。之前他是 Oracle 的首席顧問。他的經驗範圍從在尼泊爾加德滿都創建電子藏英辭典,到支持高盛的展示中心和管理 TIAA-CREF 的交易系統。作為哥倫比亞大學計算機技術與應用計畫的講師,他獲得了傑出教學獎。Rosenzweig 撰寫並呈現了《Oracle Forms Developer: The Complete Video Course》,並共同撰寫了《Oracle Web Application Programming for PL/SQL Developers》。

Elena Silvestrova Rakhimov 是 Alea Software 的高級開發者和團隊負責人。她在各種企業和商業環境中擁有超過十五年的資料庫開發經驗,涵蓋從非營利組織到華爾街的範疇。她曾在哥倫比亞大學教授資料庫程式設計。

目錄
致謝 xiv
關於作者 xv
導言 xvii

第一章 PL/SQL 概念 1
實驗 1.1 客戶端/伺服器架構中的 PL/SQL 2
1.1.1 使用 PL/SQL 匿名區塊 8
1.1.2 理解 PL/SQL 的執行方式 10
實驗 1.2 SQL*Plus 中的 PL/SQL 12
1.2.1 使用替代變數 16
1.2.2 使用 DBMS_OUTPUT.PUT_LINE 語句 17
第一章 自己試試 19

第二章 一般程式語言基礎 21
實驗 2.1 PL/SQL 程式設計基礎 22
2.1.1 利用 PL/SQL 語言組件 23
2.1.2 利用 PL/SQL 變數 24
2.1.3 處理 PL/SQL 保留字 26
2.1.4 在 PL/SQL 中使用標識符 27
2.1.5 使用固定數據類型 28
2.1.6 聲明和初始化變數 31
2.1.7 理解區塊的範圍、嵌套區塊和標籤 34
第二章 自己試試 37

第三章 PL/SQL 中的 SQL 39
實驗 3.1 在 PL/SQL 中使用 DML 40
3.1.1 使用 SELECT INTO 語法進行變數初始化 41
3.1.2 在 PL/SQL 區塊中使用 DML 42
3.1.3 在 PL/SQL 區塊中使用序列 44
實驗 3.2 使用 SAVEPOINT 45
3.2.1 在 PL/SQL 區塊中使用 COMMIT、ROLLBACK 和 SAVEPOINT 48
第三章 自己試試 51

第四章 條件控制:IF 語句 53
實驗 4.1 IF 語句 54
4.1.1 使用 IF-THEN 語句 58
4.1.2 使用 IF-THEN-ELSE 語句 62
實驗 4.2 ELSIF 語句 65
4.2.1 使用 ELSIF 語句 69
實驗 4.3 嵌套 IF 語句 74
4.3.1 使用嵌套 IF 語句 76
第四章 自己試試 80

第五章 條件控制:CASE 語句 81
實驗 5.1 CASE 語句 82
5.1.1 使用 CASE 語句 89
5.1.2 使用搜尋 CASE 語句 91
實驗 5.2 CASE 表達式 96
5.2.1 使用 CASE 表達式 100
實驗 5.3 NULLIF 和 COALESCE 函數 103
5.3.1 NULLIF 函數 107
5.3.2 使用 COALESCE 函數 109
第五章 自己試試 112

第六章 迭代控制:第一部分 113
實驗 6.1 簡單迴圈 114
6.1.1 使用帶 EXIT 條件的簡單迴圈 118
6.1.2 使用帶 EXIT WHEN 條件的簡單迴圈 120
實驗 6.2 WHILE 迴圈 124
6.2.1 使用 WHILE 迴圈 128
實驗 6.3 數值 FOR 迴圈 132
6.3.1 使用帶 IN 選項的數值 FOR 迴圈 137
6.3.2 使用帶 REVERSE 選項的數值 FOR 迴圈 139
第六章 自己試試 142

第七章 迭代控制:第二部分 143
實驗 7.1 CONTINUE 語句 144
7.1.1 使用 t...