Introduction to Oracle10g PL/SQL Programming

Summary

The Oracle® 10g release has greatly enhanced the features and functionality of PL/SQL. Students will learn the fundamentals of the PL/SQL programming language. Students will write stored procedures, functions, packages, and triggers, and implement complex business rules in Oracle. Students will learn programming, management, and security issues of working with PL/SQL program units. Programming topics will include the built-in packages that come with Oracle, the creation of triggers, and stored procedure features.

Prerequisites
A solid understanding of SQL and 3GL programming is required. It is recommended the student understand Oracle 10g SQL features.

Course Objectives
On completion of this course, the student should be able to
  • Gain a working knowledge of programming Oracle 10g databases using the PL/SQL language
  • Learn the use of stored procedures, functions, packages and triggers
  • Understand management and security issues in working with PL/SQL

Intended Audience
Application developers and database administrators

Length
3 Days

Format
Instructor-led course, with practical computer-based exercises.

Course Outline

  • 1. Triggers
    • Beyond Declarative Integrity
    • Triggers
    • Types of Triggers
    • Row-Level Triggers
    • Trigger Predicates
    • Trigger COnditions
    • Using SEQUENCEs
    • Cascading Triggers and Mutating Tables
    • Generating an Error
    • Maintaining Triggers

  • 2. PL/SQL Variables and Datatypes
    • Anonymous Blocks
    • Declaring Variables
    • Datatypes
    • Subtypes
    • Character Data
    • Dates and Timestamps
    • Date Intervals
    • Anchored Types
    • Assignment and Conversions
    • Selecting into a Variable
    • Returning into a Variable

  • 3. PL/SQL Syntax and Logic
    • Conditional Statements - IF/THEN
    • Conditional Statements - CASE
    • Comments and Labels
    • Loops
    • WHILE and FOR Loops
    • SQL in PL/SQL
    • Local Procedures and Functions

  • 4. Stored Procedures and
      Functions
    • Stored Subprograms
    • Creating a Stored Procedure
    • Procedure Calls and Parameters
    • Parameter Modes
    • Creating a Stored Function
    • Stored Functions and SQL
    • Invoker's Rights

  • 5. Exception Handling
    • SQLCODE and SQLERRM
    • Exception Handlers
    • Nesting Blocks
    • Scope and Name Resolution
    • Declaring and Raising Named Exceptions
    • User-Defined Exceptions

  • 6. Records, Collections, and User-
      Defined Types
    • Record Variables
    • Using the %ROWTYPE Attribute
    • VARRAY and Nested TABLE Collections
    • Using Nested TABLEs
    • Using VARRAYs
    • Collection in Database Tables
    • Associative Array Collections
    • Collection Methods
    • Iterating Through Collections

  • 7. Cursors
    • Multi-Row Queries
    • Declaring and Opening Cursors
    • Fetching Rows
    • Closing Cursors
    • The Cursor FOR Loop
    • FOR UPDATE Cursors
    • Cursor Parameters
    • The Implicit (SQL) Cursor

  • 8. Bulk Operations
    • Bulk Binding
    • BULK COLLECT Clause
    • FORALL Statement
    • FORALL Variations
    • Bulk Returns
    • Bulk Fetching with Cursors

  • 9. Using Packages
    • Packages
    • Oracle-Supplied Packages
    • The DBMS_OUTPUT Package
    • The DBMS_UTILITY Package
    • The UTL_FILE Package
    • Creating Pipes with DBMS_PIPE
    • Writing to and Reading from a Pipe
    • The DBMS_METADATA Package
    • XML Packages
    • Networking Packages
    • Other Supplied Packages

  • 10. Creating Packages
    • Structure of a Package
    • The Package Interface and Implementation
    • Package Variables and Package State
    • Overloading Package Functions and Procedures
    • Forward Declarations
    • Strong REF CURSOR Variables
    • Weak REF CURSOR Variables

  • 11. Working with LOBs
    • Large Object Types
    • Oracle Directories
    • LOB Locators
    • Internal LOBs
    • External LOBs
    • Temporary LOBs
    • The DBMS_LOB Package

  • 12. Maintaining PL/SQL Code
    • Privileges for Stored Programs
    • Data Dictionary
    • PL/SQL Stored Program Compilation
    • Conditional Compilation
    • Compile-Time Warnings
    • The PL/SQL Execution Environment
    • Dependencies and Validation
    • Maintaining Stored Programs

  • Appendix A - Dynamic SQL
    • Generating SQL at Runtime
    • Native Dynamic SQL vs. DBMS_SQL Package
    • The EXECUTE IMMEDIATE Statement
    • Using Bind Variables
    • Multi-row Dynamic Queries
    • Bulk Operations with Dynamic SQL
    • Using DBMS_SQL
    • DBMS_SQL Subprograms

  • Appendix B - PL/SQL Versions, Datatypes, and Language Limits

  • Appendix C - Oracle10g Supplied Packages

Hardware and Software Requirements

Course exercises require Oracle 10g running on a Microsoft Windows, Linux, or multi-user UNIX system. See the appropriate course Setup Guide for details.

A good minimal hardware profile for this course would have a Pentium 500-MHz or equivalent CPU, 512 MB of RAM, and at least 4 GB of free disk space for the Oracle installation.



Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 3

Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 4

Notice: Undefined variable: REMOTE_USER in /var/www/datadeliverance/inc/trademarks.inc on line 7

Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 7

Notice: Undefined index: printer in /var/www/datadeliverance/inc/trademarks.inc on line 11

Go to course catalogue