ORACLE DATABASE 12C: PL/SQL II – INTERMEDIATE: DEVELOP PROGRAM UNITS
Course Overview
This course is intended for those who have already learned the basics of the Oracle PL/SQL database programming language and its syntax, and who are now ready to employ the language in the development of database applications. In particular, the focus of this course will be on the use of database-resident stored program units such as procedures, functions, packages and database triggers. New features introduced with the Oracle 12c release of the database are also explained and demonstrated.
Course Objectives
Course Prequisites
Target Audience
This course is intended for those who have already learned the basics of the Oracle PL/SQL database programming language and its syntax, and who are now ready to employ the language in the development of database applications.
Course Outline
Introducing Database-Resident Program Units
- About Database-Resident Programs
- Physical Storage & Execution
- Types Of Stored Program Units
- Stored Program Unit Advantages
- Modular Design Principles
Creating Stored Procedures & Functions
- Stored Procedures & Functions
- CREATE Procedure / CREATE Function
- Creating Procedures & Functions
- RAISE_SALARY() Procedure
- SALARY_VALID() Function
- The Parameter Specification
- DEFAULT Clause
- SYSTEM & OBJECT Privileges
- Using The Development Tools
Executing Stored Procedures & Functions
- Calling Procedures & Functions
- Unit Testing With EXECUTE
- ANONYMOUS BLOCK Unit Testing
- Specifying A Parameter Notation
- SQL Worksheet Unit Testing
- Calling Functions From SQL
Maintaining Stored Program Units
- Recompiling Programs
- Mass Recompilation Using UTL_RECOMP()
- Dropping Procedures & Functions
- DROP Procedure / Function
- Data Dictionary Metadata
- Using USER_OBJECTS
- Using USER_SOURCE
- Using USER_ERRORS
- Using USER_OBJECT_SIZE
- Using USER_DEPENDENCIES
Managing Dependencies
- DEPENDENCY INTERNALS
- TRACKING DEPENDENCIES
- The DEPENDENCY TRACKING Utility
- SQL Developer Dependency Info
- Dependency Strategy Checklists
Creating & Maintaining Packages
- About Packages
- Creating Packages
- Maintaining Packages
- Performance Considerations
Advanced Package Capabilities
- Definer & Invoker Rights
- White Lists & Accessible By
- Persistent Global Objects
- Defining Initialization Logic
- Object Orientation Support
Advanced Cursor Techniques
- USING CURSOR VARIABLES
- Using SYS_REFCURSOR
- Using CURSOR Expressions
Using System-Supplied Packages
- DBMS_OUTPUT()
- UTL_FILE()
- FOPEN() Example
Database Trigger Concepts
- About Database Triggers
- DML EVENT TRIGGER Sub-Types
- DATABASE TRIGGER Scenario
- TRIGGER Execution Mechanisms
- TRIGGERS Within SQL Worksheet
Creating Database Triggers
- STATEMENT-LEVEL TRIGGERS
- Using RAISE_APPLICATION_ERROR()
- ROW-LEVEL TRIGGERS
- EXAMPLES OF TRIGGERS
- EMPLOYEE_SALARY_CHECK Example
- EMPLOYEE_JOURNAL Example
- BUDGET_EVENT Example
- INSTEAD OF TRIGGERS
- Triggers Within An Application
Maintaining Database Triggers
- CALL Syntax
- Trigger Maintenance Tasks
- SHOW ERRORS Trigger
- DROP Trigger
- ALTER Trigger
- Multiple Triggers For A Table
- Handling Mutating Table Issues
Implementing System Event Triggers
- What Are System Event Triggers?
- Defining The Scope
- Available System Events
- System Event Attributes