About the Author |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Acknowledgments |
|
xxi | |
Foreword |
|
xxiii | |
Introduction (The Big Picture) |
|
xxv | |
Chapter 1 Relational SQL |
|
1 | (36) |
|
|
1 | (4) |
|
An Entity-Relationship Diagram |
|
|
3 | (1) |
|
Data Definition Language (DDL) |
|
|
3 | (1) |
|
It's Your Turn to Create a Table |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
It's Your Turn to Create an Index |
|
|
6 | (1) |
|
|
6 | (3) |
|
|
6 | (1) |
|
|
7 | (2) |
|
It's Your Turn to Create a Constraint |
|
|
9 | (1) |
|
|
9 | (2) |
|
|
11 | (1) |
|
|
12 | (6) |
|
|
12 | (1) |
|
It's Your Turn to Insert with Values |
|
|
13 | (1) |
|
|
14 | (2) |
|
It's Your Turn to Insert with Select |
|
|
16 | (2) |
|
|
18 | (2) |
|
Fix a Mistake with Update |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
21 | (1) |
|
|
21 | (4) |
|
|
22 | (2) |
|
|
24 | (1) |
|
|
25 | (11) |
|
|
25 | (1) |
|
|
25 | (3) |
|
|
28 | (4) |
|
It's Your Turn to Create Code Tables |
|
|
32 | (1) |
|
|
32 | (2) |
|
It's Your Turn to Create Content Tables |
|
|
34 | (1) |
|
Create an Intersection Table |
|
|
35 | (1) |
|
It's Your Turn to Create Intersection Tables |
|
|
36 | (1) |
|
|
36 | (1) |
Chapter 2 Blocks, Functions, and Procedures |
|
37 | (24) |
|
|
37 | (2) |
|
|
37 | (2) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
40 | (4) |
|
|
40 | (3) |
|
It's Your Turn to Create a Function |
|
|
43 | (1) |
|
|
44 | (4) |
|
|
45 | (1) |
|
It's Your Turn to Create a Procedure |
|
|
46 | (2) |
|
|
48 | (3) |
|
An Example of Nesting Blocks |
|
|
48 | (2) |
|
|
50 | (1) |
|
|
51 | (9) |
|
Create a Package Specification |
|
|
51 | (2) |
|
It's Your Turn to Create a Package Specification |
|
|
53 | (1) |
|
|
54 | (5) |
|
It's Your Turn to Create a Package Body |
|
|
59 | (1) |
|
Benefits of Using Packages |
|
|
60 | (1) |
|
|
60 | (1) |
Chapter 3 Types, Variables, and Scope |
|
61 | (26) |
|
|
61 | (1) |
|
|
62 | (5) |
|
|
62 | (1) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
64 | (2) |
|
|
66 | (1) |
|
It's Your Turn to Declare Variables |
|
|
66 | (1) |
|
|
67 | (6) |
|
|
67 | (5) |
|
It's Your Turn to Scope Things Out |
|
|
72 | (1) |
|
|
73 | (6) |
|
|
73 | (4) |
|
|
77 | (1) |
|
|
78 | (1) |
|
|
79 | (6) |
|
|
79 | (1) |
|
|
80 | (1) |
|
|
81 | (4) |
|
It's Your Turn to Declare Parameters |
|
|
85 | (1) |
|
|
85 | (2) |
Chapter 4 Single Row Processing |
|
87 | (32) |
|
|
87 | (19) |
|
Catching a DUP_VAL_ON_INDEX Exception |
|
|
91 | (3) |
|
Using PUSQL to Predetect a Duplicate |
|
|
94 | (6) |
|
IF I Don't Tell You Now, When ELSE Can I? |
|
|
100 | (1) |
|
Using SQL to Predetect a Duplicate |
|
|
100 | (4) |
|
|
104 | (2) |
|
|
106 | (3) |
|
|
107 | (1) |
|
Using SQL to Perform Complex Updates |
|
|
107 | (2) |
|
|
109 | (1) |
|
|
110 | (6) |
|
|
112 | (2) |
|
|
114 | (1) |
|
|
115 | (1) |
|
|
116 | (3) |
Chapter 5 Multirow Processing |
|
119 | (32) |
|
|
119 | (19) |
|
|
119 | (1) |
|
Fetching Rows from a Cursor Manually |
|
|
120 | (2) |
|
|
122 | (1) |
|
|
122 | (5) |
|
It's Your Turn to Fetch Manually |
|
|
127 | (7) |
|
Fetching Rows from a Cursor Automatically |
|
|
134 | (1) |
|
It's Your Turn to Fetch Automatically |
|
|
135 | (3) |
|
|
138 | (7) |
|
Bulk Collect with a Cursor |
|
|
139 | (2) |
|
Bulk Collect with a Select Statement |
|
|
141 | (1) |
|
It's Your Turn to Bulk Collect |
|
|
142 | (3) |
|
|
145 | (5) |
|
|
150 | (1) |
Chapter 6 Object-Relational SQL |
|
151 | (46) |
|
|
151 | (2) |
|
|
153 | (1) |
|
|
153 | (1) |
|
|
154 | (1) |
|
|
154 | (1) |
|
|
155 | (2) |
|
|
155 | (1) |
|
Step 2 User-Defined Types |
|
|
156 | (1) |
|
|
156 | (1) |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
157 | (14) |
|
Create a User-Defined Type Specification |
|
|
158 | (3) |
|
Create a User-Defined Type Implementation |
|
|
161 | (5) |
|
It's Your Turn to Create a User-Defined Type |
|
|
166 | (5) |
|
|
171 | (3) |
|
|
171 | (3) |
|
It's Your Turn to Create an Object View |
|
|
174 | (1) |
|
|
174 | (4) |
|
|
174 | (2) |
|
It's Your Turn to Create an Object Table |
|
|
176 | (2) |
|
|
178 | (18) |
|
Nested Types and Collections |
|
|
179 | (2) |
|
It's Your Turn to Prove There's No Impedance Mismatch |
|
|
181 | (15) |
|
|
196 | (1) |
Chapter 7 Troubleshooting |
|
197 | (60) |
|
|
198 | (2) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (1) |
|
|
200 | (3) |
|
|
200 | (2) |
|
|
202 | (1) |
|
|
203 | (4) |
|
|
203 | (2) |
|
|
205 | (1) |
|
It's Your Turn to Use put_line() |
|
|
205 | (2) |
|
|
207 | (20) |
|
|
207 | (9) |
|
|
216 | (4) |
|
It's Your Turn to Use Debug Logging |
|
|
220 | (7) |
|
|
227 | (7) |
|
Debugging with Oracle SQL Developer |
|
|
227 | (6) |
|
Debugging Anonymous PUSQL |
|
|
233 | (1) |
|
Debugging with TOAD for Oracle |
|
|
233 | (1) |
|
Debugging with Visual Studio |
|
|
233 | (1) |
|
It's Your Turn to Use a Debugger |
|
|
233 | (1) |
|
|
234 | (10) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
236 | (5) |
|
It's Your Turn to Profile |
|
|
241 | (3) |
|
|
244 | (11) |
|
|
244 | (4) |
|
|
248 | (2) |
|
It's Your Turn to Use Explain Plan |
|
|
250 | (5) |
|
|
255 | (1) |
|
|
255 | (2) |
Chapter 8 Testing |
|
257 | (70) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
261 | (27) |
|
|
264 | (1) |
|
A TEST Package Specification |
|
|
265 | (4) |
|
|
269 | (6) |
|
It's Your Turn to Create a Testing Tool |
|
|
275 | (13) |
|
|
288 | (32) |
|
Testing a Code Table Package |
|
|
288 | (11) |
|
It's Your Turn to Test a Code Table Package |
|
|
299 | (1) |
|
Testing a Content Table Package |
|
|
299 | (7) |
|
It's Your Turn to Test a Content Table Package |
|
|
306 | (1) |
|
Testing an Intersection Table Package |
|
|
306 | (10) |
|
It's Your Turn to Test an Intersection Table Package |
|
|
316 | (1) |
|
|
317 | (3) |
|
It's Your Turn to Test a Type |
|
|
320 | (1) |
|
|
320 | (6) |
|
|
321 | (5) |
|
It's Your Turn to Automate Test Processing |
|
|
326 | (1) |
|
|
326 | (1) |
Chapter 9 Documenting |
|
327 | (38) |
|
Indestructible Documentation |
|
|
328 | (6) |
|
SQLPlus Documentation Tools |
|
|
328 | (2) |
|
GUI Development Environment Tools |
|
|
330 | (3) |
|
Rules for Documentation Comments |
|
|
333 | (1) |
|
|
334 | (6) |
|
A Text-Based Documentation Formatting Tool |
|
|
334 | (4) |
|
Accessing Documentation on Demand |
|
|
338 | (1) |
|
It's Your Turn to Access Documentation on Demand |
|
|
339 | (1) |
|
Distributable Documentation |
|
|
340 | (22) |
|
An HTML-Based Documentation Formatting Tool |
|
|
340 | (20) |
|
Generating Distributable Documentation |
|
|
360 | (2) |
|
It's Your Turn to Generate Distributable Documentation |
|
|
362 | (1) |
|
Documentation Distribution |
|
|
362 | (1) |
|
|
363 | (2) |
Chapter 10 Examples |
|
365 | (60) |
|
|
366 | (3) |
|
|
369 | (16) |
|
|
369 | (3) |
|
|
372 | (6) |
|
Intersection Table Methods |
|
|
378 | (3) |
|
Hierarchical Table Methods |
|
|
381 | (4) |
|
|
385 | (6) |
|
|
385 | (1) |
|
|
386 | (5) |
|
|
391 | (31) |
|
|
392 | (4) |
|
On-Demand Data Processing |
|
|
396 | (3) |
|
|
399 | (8) |
|
|
407 | (7) |
|
|
414 | (8) |
|
|
422 | (3) |
Appendix A: How to Download, Install, and Use Oracle |
|
425 | (22) |
|
How to Download Oracle Database Software |
|
|
425 | (6) |
|
How to Install Oracle Database Software |
|
|
431 | (9) |
|
|
440 | (7) |
|
How to Download This Book's Source Code |
|
|
441 | (3) |
|
How to Create a New Username |
|
|
444 | (1) |
|
How to Write a SQLPlus Script |
|
|
444 | (1) |
|
How to Execute a SQLPlus Script |
|
|
444 | (1) |
|
How to Describe Your Tables and Stored Procedures |
|
|
445 | (2) |
Index |
|
447 | |