[oreilly] I Don't Like Your Examples!

Date view Thread view Subject view Author view

From: Edd Dumbill (edd@usefulinc.com)
Date: Sat Oct 14 2000 - 02:31:46 PDT


[[ decide for yourself if you want the [geezer] tag ]]

http://www.ora.com/news/feuerstein_1000.html

I Don't Like Your Examples!

by Steven Feuerstein, author of numerous O'Reilly Oracle books

I have been writing books about the Oracle PL/SQL programming language
for the last five years. In 1999, O'Reilly published my fourth book,
Oracle PL/SQL Programming Guide to Oracle8i Features, which created a
bit of an uproar among my readership, caused considerable discussion
within O'Reilly, and led to my writing this article.

Why did this book cause a sensation? Consider this excerpt from Chapter 2:

Let's look at a simple example. Suppose you are responsible for building
a database to keep track of war criminals for the International Court of
Justice. You create a package called wcpkg to keep track of alleged war
criminals. One of the programs in the package registers a new criminal.
You want that register program to always save its changes, even if the
calling program hasn't yet issued a COMMIT. These characters are, after
all, fairly slippery and you don't want them to get away.

The package specification holds no surprises; the transaction type is
not evident here:

CREATE PACKAGE wcpkg AS
          ... PROCEDURE register (
                  culprit IN VARCHAR2, event IN VARCHAR2);
END wcpkg;
/

The package body, however, contains that new and wonderful pragma:

CREATE PACKAGE BODY wcpkg AS
          ...
          PROCEDURE register (
                  culprit IN VARCHAR2, event IN VARCHAR2)
          IS
                  PRAGMA AUTONOMOUS_TRANSACTION;
          BEGIN
                  INSERT INTO war_criminal (name, activity)
                          VALUES (culprit, event);
                  COMMIT;
          END;
END wcpkg;
/

And now when I call wcpkg.register, I am assured that my changes have
been duly recorded:

BEGIN
  wcpkg.register ('Kissinger', 'Secret Bombing of
Cambodia');

Now, I expect it's not every day you pick up a technology text and read
a charge that Henry Kissinger is a war criminal for the secret bombing
of Cambodia. The examples I used in this book, in fact, were
dramatically different from my earlier texts--and from just about any
technology book you can buy. Here are some of the other topics I
incorporated into my text:

        Excessive CEO compensation--and excessive, destructive layoffs
        Union-busting activities
        Positive role of unions in society
        Police brutality
        NATO bombing of civilian targets in Serbia
        Managed Care
        National Rifle Association and gun control
        The prison industry
        Slashing social programs to finance tax cuts


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Oct 14 2000 - 02:36:41 PDT