Always Learning

Advanced Search

Programming Oracle Triggers and Stored Procedures

Programming Oracle Triggers and Stored Procedures

3rd Edition

Kevin Owens

Dec 2003, Paperback, 448 pages
ISBN13: 9780130850331
ISBN10: 0130850330
This title is no longer available.

This title cannot be purchased online
  • Print pagePrint page
  • Email this pageEmail page
  • Share

Advanced Oracle features such as triggers and stored procedures make itpossible to build databases that incorporate business rules - allowing companiesto reengineer processes more quickly and effectively than ever. This is the"bible" for anyone designing complex Oracle databases that incorporatebusiness rules, and it is fully compliant with Oracle 10g. The book presents asimple methodology which yields a highly-maintainable repository of triggersand stored procedures which are easy to manage and modify as the businesschanges. Topics covered include: declarative constraints; analyzing constraintsthrough the data dictionary; PL/SQL program units; embedded SQL; datatypes and composite structures; error handling and exceptions; andinterprocess communication.A trigger is a condition, which if true, causes a stored procedure to execute.Stored procedures are SQL code embedded in the database that providescritical information to the end user when triggered.

  • Complete tutorial for database developers!
  • Thorough coverage of PL/SQL
  • Practical "cookbook" techniques

Effectively create and manage complex databases with Oracle! Systems and database expert Kevin Owens explores PL/SQL, Oracle's answer to the Structured Query Language (SQL), and teaches you what you need to know to build robust and complex databases for your business.

Using easy-to-follow instructions and examples, this book presents techniques to take advantage of Oracle features such as triggers and stored procedures-features that allow your databases to incorporate business rules which are easy to manage and modify as the business evolves. Topics covered include:

  • Viewing constraints in the data dictionary
  • Complex rule enforcement
  • PL/SQL program units and language features
  • Data types and composite structure
  • Error handling and exceptions
  • Inter-process communications
  • Declarative constraints, including primary key, unique, foreign key, check, and much more

Programming Oracle Triggers and Stored Procedures, Third Edition, is an invaluable resource for database developers, designers, and project leaders looking to build and maintain truly intelligent, complex databases


1. An Introduction to Relational Database Tables.
Before Relational Tables. SQL. Tables. SQL Statements. Table Column Datatypes. Behind Tables.

2. Interacting with Oracle.
Simplify SQL*Plus for Yourself on Windows. Connecting. Connecting to an Infrastructure. Disconnecting. Command Line. Changes on the Command Line. Scripts. Script Output. Command Line Arguments. SQL*Plus with Korn Shell. Batch Command Files. SQL*Plus with Active State Perl. Privileges. DUAL. Autotrace.

3. Declarative Constraints.
Primary Key. Unique. Foreign Key. Check. Not Null Constraints. Default Values. Modifying Constraints. Exception Handling. Data Loads.

4. A Data Model with Constraints.
Entity Relationship Diagram. Table Descriptions. DDL. Sample Data.

5. Viewing Constraints in the Data Dictionary.
What You Can See. Dictionary Views: An Overview. Constraint Views. USER_CONS_COLUMNS. USER_CONSTRAINTS. Data Dictionary Constraint Scripts.

6. Row Trigger Mechanics.
Introduction. Before versus After. Insert Row Trigger Syntax. Trigger Body. Example Row Triggers. A Table with Oracle Constraints and Business Rules.

7. Statement Level Triggers.
Sequence of Events. Insert Statement Trigger Syntax. Statement Level Aggregation. Processing Row Captured Data.

8. Complex Rule Enforcement.

9. The PL/SQL Environment.
A Hello World Program. Referencing Oracle Packages. USER_OBJECTS. Dependencies among Procedures. USER_DEPENDENCIES. USER_SOURCE. Sharing Code. Compilation Dependency. USER_ERRORS.

10. PL/SQL Program Units.
Procedures. Functions. Subprogram Encapsulation: Introduction to Packages. Package Specification. Package Body. Application Partitioning. Data Abstraction. Parameters and Modes. Overloading.

11. PL/SQL Language Features.
Comments. Assignments and Statements. Boolean Expression. Expressions with Null. Logical Operators. String Concatenation. Arithmetic Expressions. Variable Declarations. Types. IF Statement. CASE Statement. LOOP. STRING Manipulation Functions. Miscellaneous String Functions. Numeric Functions. Random Number Generation. Date Functions. Exceptions. Database Access with SQL. Sending Pipe Messages (DBMS_PIPE). Signaling Events with Alerts (DBMS_ALERT). Email Notification with Triggers and Alerts.


KEVIN OWENS is the Oracle database administrator at the U.S. Department of the Treasury in Washington, DC.