Académique Documents
Professionnel Documents
Culture Documents
Student Guide
40061GC10
Production 1.0
June 2002
D34761
Authors Copyright © Oracle Corporation, 2002. All rights reserved.
All references to Oracle and Oracle products are trademarks or registered trademarks
Publisher of Oracle Corporation.
Hamsa Venkatachalam All other products or company names are used for identification purposes only, and
may be trademarks of their respective owners.
Contents
Preface
I Introduction
Course Objectives I-2
Oracle Complete Solution I-3
Course Agenda I-4
Course Agenda I-5
Tables Used in this Course I-6
iii
3 Design Considerations for PL/SQL Packages
Objectives 3-2
System Global Area (SGA) 3-3
The Shared Pool 3-4
Package Memory Issues 3-6
Reusing Package Memory 3-8
Rules for Pragma SERIALLY_REUSABLE 3-9
Restrictions on Package Functions Used in SQL 3-10
TRUST Keyword 3-12
Benefits of Overloading in Packages 3-14
Using Overloading 3-15
Guidelines for Cursor Design 3-16
Standardizing Constants 3-21
Standardizing Exceptions 3-22
PL/SQL Wrapper 3-26
Running the Wrapper 3-27
Examples of Wrapping 3-28
Guidelines for Wrapping 3-29
Summary 3-30
Practice Overview 3-31
iv
5 Object-Oriented Principles Overview
Objectives 5-2
Overview 5-3
Definition of an Object 5-4
Objects Perform Operations 5-5
Objects Remember Values 5-6
Objects Are an Abstraction 5-7
Encapsulation 5-8
Guided Practice: Spot the Operations and Attributes 5-9
Object Hierarchies 5-10
Definition of an Object Type 5-11
Why Do We Need Object Types? 5-12
Identifying an Object Type 5-13
Object Types Versus Objects 5-14
Inheritance 5-15
The “Is-a-Kind-of” Relationship 5-17
Polymorphism 5-18
Summary 5-19
Practice 5 Overview 5-20
v
Using Object Subtypes 6-32
Data Dictionary Views for Objects 6-34
Data Dictionary Views for Object Type Methods 6-35
Summary 6-36
Practice Overview 6-37
vi
Native Dynamic SQL 8-25
Advantages of Native Dynamic SQL Over dbms_sql 8-28
SQL Versus PL/SQL 8-30
Tracing PL/SQL Execution 8-33
Tracing PL/SQL: Steps 8-36
Step 1: Enable Specific Subprograms 8-37
Steps 2 and 3: Identify a Trace Level and Start Tracing 8-38
Step 4: Turn Off Tracing 8-39
Step 5: Examine the Trace Information 8-40
plsql_trace_runs and plsql_trace_events 8-41
Profiling PL/SQL Applications 8-43
Profiling PL/SQL: Steps 8-45
Profiling Example 8-46
Identify and Tune Memory Issues 8-49
Pinning Objects 8-50
Network Issues 8-54
Summary 8-57
Practice Overview 8-58
vii
utl_smtp Exceptions and Limitations 9-30
Summary 9-31
Practice Overview 9-32
viii
Appendix A - PL/SQL Quiz Solutions
ix
Appendix D – Table Descriptions