Oracle PL/SQL Programming Guide to Oracle8i Features

Oracle PL/SQL Programming Guide to Oracle8i Features

by Steven Feuerstein
     
 

Oracle8i, the long-awaited "Internet database" from Oracle Corporation, has hit the streets running—and you may find yourself struggling to keep up with Oracle's fast-moving technology. Oracle boasts that Oracle8i offers more than 150 new features, many of them designed to make its popular database programming language, PL/SQL, faster, more powerful, and

Overview

Oracle8i, the long-awaited "Internet database" from Oracle Corporation, has hit the streets running—and you may find yourself struggling to keep up with Oracle's fast-moving technology. Oracle boasts that Oracle8i offers more than 150 new features, many of them designed to make its popular database programming language, PL/SQL, faster, more powerful, and easier to use.This concise and engaging book is both a companion to Oracle PL/SQL Programming (widely recognized as the "bible" for PL/SQL developers) and a guide designed to bring you up to speed as quickly as possible on the new PL/SQL features of Oracle8i. Following the style of Feuerstein's earlier books, the Guide to Oracle8i Features combines easy-to-understand descriptions of the new Oracle8i features with a wealth of interesting and informative examples.The major Oracle8i PL/SQL features include the following:

  • Autonomous transactions—the ability to commit or roll back changes without affecting the "main" transaction in the rest of your session
  • Invoker rights—At compilation time, you can now decide whether a program (or all programs in a package) should run under the authority of the definer or the invoker of that program
  • Native dynamic SQL—A native implementation of dynamic SQL that's faster and easier than the DBMS_SQL built-in package
  • Bulk binds and collects—A major performance improvement that lets you process multiple rows in a single operation
  • System-level database triggers—With this feature and Advanced Queueing (AQ), you can take advantage of the publish/subscribe capabilities of Oracle8i
  • Fine-grained access control—This feature lets you implement security policies with functions and then use those functions to implement row-level security on tables or views.
  • Many new and enhanced built-in packages—New packages include DBMS_JAVA, DBMS_PROFILER, DBMS_TRACE, and more. DBMS_UTILITY, DBMS_AQ, and others have been enhanced as well.
  • Calling Java methods from within PL/SQL—The book includes enough Java know-how to help you build simple Java classes, load them into the Oracle8i database, and leverage those classes from within your PL/SQL code.
Some PL/SQL developers are uneasy about what the introduction of Java means to their applications—and their programming future. But the two languages are expected to work well together in Oracle8i. You'll be able to take advantage of all the power of Java without giving up the performance and usability advantages of PL/SQL!Included with this book is a diskette containing an online tool developed by RevealNet, Inc., that provides point-and-click access to approximately 100 files of reusable source code and examples.The Guide to Oracle8i Features showcases all the powerful new features of Oracle8i designed especially for PL/SQL developers. You'll find it indispensable as you strive to take the fullest possible advantage of everything this exciting new version has to offer.Table of Contents:
  1. Oracle8i: A Bounty for PL/SQL Developers
  2. Choose Your Transaction!
  3. Invoker Rights: Your Schema or Mine?
  4. Native Dynamic SQL in Oracle8i
  5. Bulking Up with PL/SQL 8.1
  6. New Trigger Features in Oracle8i
  7. New and Enhanced Built-in Packages in Oracle8i
  8. Deploying Fine-Grained Access Control
  9. Calling Java from PL/SQL
  10. More Goodies for Oracle PL/SQL Developers

Product Details

ISBN-13:
9781565926752
Publisher:
O'Reilly Media, Incorporated
Publication date:
10/08/1999
Pages:
264
Product dimensions:
7.04(w) x 9.19(h) x 0.86(d)

Read an Excerpt


Chapter 1: Oracle 8i: A Bounty for PL/SQL Developers

Introduction

After long delays, Oracle 8i Release 8.1 went production in 1999! The "Internet Database" is packed with an astounding and intimidating array of powerful new features - and I don't even work for Oracle anymore! I don't even have to use exclamation marks to describe all the great things you can do with Oracle 8i Release 8.1!

Whew. Got that out of my system. Do you ever have trouble separating the marketing from the reality with Oracle Corporation? The name of their latest release brings that issue to the fore-like never before. "Oracle 8i Release 8.1" - what does all that mean? Here is how I see it: "Oracle 8i" - that's the marketing piece. The first database for the Internet. OK. "Release 8.1 "-now they're talking my language, I started with Oracle 5.1 and have been steadily pleased with the improvements through 6 (quickly, please) and then Oracle7. Oracle 8.0 was a .0 release and as a result many, many organizations around the world paid it very little attention. Now, finally, we have Oracle 8.1 and I expect that many, many organizations will move relatively quickly to this release level.

What do you get with Oracle 8. 1? The list is very long and very impressive ("more than 150 new features," says Oracle, and I believe Larry in this case, for maybe the first time ever). Here are a few of the features I have read about:

  • The Aurora Java Virtual Machine right inside the database
  • Support for Java Stored Procedures
  • JDeveloper, a Java Integrated Development Environment.
  • iFS, the Internet File System (not currently available; should be out by the end of 1999)
  • Support for the Linux operating system
  • interMedia
  • Support for SQLJ and JDBC
  • WebDB
  • Autonomous transactions
  • Invoker Rights Model
  • Many performance improvements

The Oracle 8i documentation has a section titled "Getting to Know Oracle 8i"; the table of contents for new features is 259 lines long! Is that more than mere mortals can deal with? It sure is more than I can deal with. So I am going to stick with what I know best: PL/SQL. This book focuses almost exclusively on new Oracle 8i features that have a direct impact on (or are implemented by) the PL/SQL language. As you will see, even if we just constrain the focus to PL/SQL, there are many, many new techniques and technologies to learn, absorb and then leverage in our application environments.

And Then There's Java

Before I dive into my feature "roundups", allow me to reflect for a moment on the PL/SQL language and its future in the Oracle environment. Why would I feel the need to do this? I can answer with one word. Java.

Contrary to popular belief, I do not hate Java. I hold no animosity for a language that has at least the potential to "unseat" PL/SQL as the dominant (used to be only) programming language inside the Oracle database. I have even begun to study Java. It is very different from PL/SQL. I am even planning to write a book to help PL/SQL developers make the transition to Java.

There is no doubt that we will all need to be proficient enough at both languages to be able to:

  • Decide which language is best used to solve a particular problem.
  • Call JSPs from PL/SQL and vice versa.

So yes, Oracle supports interoperability between these two languages, and we need to be "ambidextrous" when it comes to "left brain" PL/SQL and "right brain" Java.

The big question/rumor that has floated around the Oracle world lately, though, is a more troubling one: will Oracle simply abandon PL/SQL for Java? Not only would that put me out of business, but also it would cause tremendous upheaval in the Oracle customer world. It is simply not going to happen, and the best way to demonstrate that fact is to see the forward motion in the PL/SQL language.

When object technology was first introduced in the Oracle database and in PL/SQL (in Oracle 8.0), a debate raged within Oracle HQ: should PL/SQL become a full-fledged object-oriented language? Should it remain focused on what it does best? Now with the incorporation of Java into the Oracle database, this debate has been resolved. PL/SQL is the premier database programming language (specific to Oracle, but superior to the others, such as Informix 4GL and Sybase/Microsoft's TransactSQL, as demonstrated by the adoption of many PL/SQL features and syntax into the ANSI standards), and Oracle will focus its energies on maintaining that position.

What we see in Oracle 8.1 and what we will continue to see in future releases is a "permanent revolution" in the PL/SQL language with the goals of making it ever:

  • Easier to use
  • More efficient
  • More functional

Hey, they are even exploring the possibility of compiling PL/SQL programs! Now that would be PL/SQL on steroids! Of course, the proof is in the programming. What have they done for us lately? What can we do with PL/SQL in 8.1 that we couldn't do before? Join me on a journey into the depths of Oracle 8i Release 8.1 to answer those questions.

About the Examples

I've been writing intensively about PL/SQL since 1994, and I have a great time doing it. At the same time, I must admit that I have simultaneously grown:

  1. A little bit bored of using the same set of examples again and again (yes, those infamous emp/employee and dept/department tables), and...
  2. Very concerned about the state of the world as we approach the end of the 20th Given those twin "preoccupations", I have decided to offer examples that are decidedly different from the usual. From the state of health care in the United States, to the strength of the gun lobby, from wage structures to environmental issues, I'll be talking about those in this book.

    I believe that even if you don't agree with the positions I have on a particular issue, you will find that this "breath of fresh air" material will help you engage with the technical material.

    I would also be very happy to hear from you - whether you agree or disagree! - and encourage you to visit my website, www.StevenFeuerstein.com, where you can read more about my life and viewpoints, and get in touch.

    New PL/SQL Features Roundup

    Even if I stick to the "narrow" course of exploring only those PL/SQL-related new features of Oracle 8i, I can still find lots to talk about. This section previews the chapters of the book, and introduces you to the main PL/SQL enhancements in this release of Oracle....

Meet the Author

Steven Feuerstein is considered one of the world's leading experts on the Oracle PL/SQL language. He is the author or coauthor of Oracle PL/SQL Programming, Oracle PL/SQL Best Practices, Oracle PL/SQL Programming: Guide to Oracle8i Features, Oracle PL/SQL Developer's Workbook, Oracle Built-in Packages, Advanced Oracle PL/SQL Programming with Packages, and several pocket reference books (all from O'Reilly & Associates). Steven is a Senior Technology Advisor with Quest Software, has been developing software since 1980, and worked for Oracle Corporation from 1987 to 1992.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >