Tải bản đầy đủ (.pdf) (7 trang)

a0008 5 oracle database 11g develop plsql program units vol 1 morebook vn 8349

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (26.32 KB, 7 trang )

Oracle Database 11g: Develop
PL/SQL Program Units
Volume 1 • Student Guide

D49986GC20
Edition 2.0
September 2009
D63065


Author

Copyright © 2009, Oracle. All rights reserved.

Lauran Serhal

Disclaimer

Technical Contributors
and Reviewers
Anjulaponni Azhagulekshmi
Christian Bauwens
Christoph Burandt
Zarko Cesljas
Yanti Chang
Salome Clement
Laszlo Czinkoczki
Ingrid DelaHaye
Steve Friedberg
Laura Garza
Joel Goodman


Nancy Greenberg
Manish Pawar
Brian Pottle
Helen Robertson
Tulika Srivastava
Ted Witiuk
Editors
Arijit Ghosh
Raj Kumar
Publishers
Pavithran Adka
Sheryl Domingue

This document contains proprietary information and is protected by copyright and other intellectual
property laws. You may copy and print this document solely for your own use in an Oracle training
course. The document may not be modified or altered in any way. Except where your use constitutes
"fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part
without the express authorization of Oracle.
The information contained in this document is subject to change without notice. If you find any
problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway,
Redwood Shores, California 94065 USA. This document is not warranted to be error-free.
Restricted Rights Notice
If this documentation is delivered to the United States Government or anyone using the
documentation on behalf of the United States Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these
training materials are restricted by the terms of the applicable Oracle license agreement and/or the
applicable U.S. Government contract.
Trademark Notice

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be
trademarks of their respective owners.


Introduction

Copyright © 2009, Oracle. All rights reserved.


Lesson Objectives
After completing this lesson, you should be able to do the
following:
• Discuss the goals of the course
• Identify the available environments that can be used in this
course
• Describe the database schema and tables that are used in
the course
• List the available documentation and resources

I-2

Copyright © 2009, Oracle. All rights reserved.

Lesson Aim
PL/SQL supports many program constructs. In this lesson, you review program units in the form
of anonymous blocks, and you are introduced to named PL/SQL blocks. Named PL/SQL blocks
are also referred to as subprograms. Named PL/SQL blocks include procedures and functions.
The tables from the Human Resources (HR) schema (which is used for the practices in this
course) are briefly discussed. The development tools for writing, testing, and debugging PL/SQL
are listed.


Oracle Database 11g: Develop PL/SQL Program Units I - 2


Lesson Agenda





I-3

Course objectives and course agenda
The schema and appendixes used in this course and the
available PL/SQL development environments in this
course
Oracle 11g documentation and additional resources

Copyright © 2009, Oracle. All rights reserved.

Oracle Database 11g: Develop PL/SQL Program Units I - 3


Practice 9: Overview
This practice covers the following topics:
• Creating advanced triggers to manage data integrity rules
• Creating triggers that cause a mutating table exception
• Creating triggers that use package state to solve the
mutating table problem


9 - 25

Copyright © 2009, Oracle. All rights reserved.

Practice 9: Overview
In this practice, you implement a simple business rule for ensuring data integrity of employees’
salaries with respect to the valid salary range for their job. You create a trigger for this rule.
During this process, your new triggers cause a cascading effect with triggers created in the
practice section of the previous lesson. The cascading effect results in a mutating table exception
on the JOBS table. You then create a PL/SQL package and additional triggers to solve the
mutating table issue.

Oracle Database 11g: Develop PL/SQL Program Units 9 - 25




×