Home > Store

Practical Oracle8i?: Building Efficient Databases

Register your product to gain access to bonus material or receive a coupon.

Practical Oracle8i?: Building Efficient Databases

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2001
  • Dimensions: 7-3/8" x 9-1/4"
  • Pages: 672
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-71584-8
  • ISBN-13: 978-0-201-71584-2

In this book, one of the world's leading Oracle database consultants covers the real-world design and development issues most Oracle books ignore! Jonathan Lewis presents powerful techniques -- and errors to avoid -- if you want to build databases that meet their objectives, stay on budget, scale to support growth, and are easy to manage. Jonathan Lewis focuses on helping database designers and developers answer two essential questions: "How should I think when designing an Oracle-based application? And, how can I select the most appropriate Oracle features for my application, taking into account their interrelationships?" Drawing upon fifteen years experience as an Oracle database designer and consultant, he delivers an intimate understanding of the Oracle database engine, and all the guidance you need to use its key features most effectively. Coverage includes: tables and tablespaces, indexing, temporary space, files, views, partitioning, lots, simple and collection objects, LOBs, integrity, PL/SQL, autonomous transactions, RLS, PQO and OPS, replication, fallback, and much more. For every Oracle database designer, developer, and manager; and for any professional called upon to maintain or optimize Oracle-based databases.

Extras

Web Resources

Click below for Web Resources related to this title:
Author's Web Site

Sample Content

Downloadable Sample Chapter

Click below for Sample Chapter related to this title:
lew14.pdf

Table of Contents



Preface.

Why Another Book?

Who Is It For?

Which Version of Oracle?

What's in This Book?

What's Not in This Book?

The Framework of the Book.

Conventions Used in the Book.



Acknowledgments.


A Cautionary Tale.

I. OVERVIEW.

1. What Is Oracle?

Data, Undo, and Redo.

Data Change.

Uncommitted Data.

Committed Data.

Side Effects of Rollback.

Locating the Data.

Conclusion.

2. Why Do Projects Fail?

Ignoring the Technology.

Avoiding the Arithmetic.

Fudging the Prototype.

Confusing the Responsibilities.

Sharing the Database.

Conclusion.

3. How the Engine Works.

The I/O Trap.

Reading Data.

Changing Data.

Side Effects.

Conclusion.

4. Classifying Your Target.

Manual Transaction Processing.

Automatic Transaction Processing.

High Batch Throughput.

Data Warehouse.

The Internet Changes Everything.

Conclusion.

II. DATA STORAGE.

5. Making the Most of Tables.

Rebuilding the Data.

Packing the Data.

More Packing.

Dropping Columns.

Strategy.

Strategy.

Up-to-Date Statistics (Nearly).

Wide Tables.

Problems and Quirks.

Strategy Notes.

6. Basic Indexing.

B-Tree Indexing.

Updates to the Index.

Low-Level Processing.

Using the Index.

Bitmap Indexing.

Administration.

Problems and Quirks.

Strategy Notes.

7. Enhanced Indexing.

Compressed B-Trees.

Minimize Records per Block.

Descending Indexes.

Reverse Key Indexes.

Function-Based Indexes.

Built-in Functions.

User-Defined Functions.

Administration.

Rebuild.

Coalesce.

Statistics.

Rename.

Optimization.

Index Joins.

Star Transformations.

Problems and Quirks.

Strategy Notes.

8. Leveraging Tablespaces.

Tablespace Strategies.

Rollback Tablespaces.

Temporary Tablespaces.

Classification.

Locally Managed Tablespaces.

General Tablespace Management.

Transportable Tablespaces.

Tablespace Point-in-Time Recovery.

Problems and Quirks.

Strategy Notes.

9. Temporary Space.

Temporary Tablespaces.

So What's New in 8.1?

Temporary Files.

Temporary Tables.

Temporary LOBs.

Problems and Quirks.

Strategy Notes.

10. Files, Raw, and RAID.

Files or Raw.

The Management Issues.

The Performance Issue.

Archiving.

Conclusion.

RAID Levels.

RAID0.

RAID.

RAID 0/1 and RAID 1/0.

RAID.

Generic RAID.

Disk Cache.

Problems and Quirks.

Strategy Notes.

11. Views.

Basics of Views.

Views for Performance.

In-Line Views.

SORT_AREA_SIZE.

Rollover Views.

Views for Security.

Views for Functionality.

Views for Clarity.

Functions Returning Datasets.

Partition Access.

Analytical Functions and Others.

Updatable Join Views.

Simple Join Views.

In-Line Updatable Views.

Object Views.

A Farewell to Partitioned Views.

Problems and Quirks.

Strategy Notes.

12. Introducing Partitioning.

Partitioning Options.

How Does Range Partitioning Work?

How Does Hash Partitioning Work?

How Does Composite Partitioning Work?

Partitioning — General Points.

Multicolumn Partitioning.

Problems and Quirks.

Strategy Notes.

13. Using Partitioning.

Administration.

Dropping Partitions.

Tablespace Management.

Packing Tablespaces.

Data Loading.

Indexing Existing Tables.

Performance.

Range Partitions with Dates.

Hash Partitions and Composite Partitions.

Partition-wise Joins.

EXPLAINPLAN.

Statistics.

Partitions and Parallel Execution.

Problems and Quirks.

Strategy Notes.

14. Index-Organized Tables.

Basic IOTs.

Indexes on IOTs.

On-Line Moves.

Advanced IOTs.

LOBs, Varrays, and Nested Tables.

Partitioning.

Restrictions on IOT Partitions.

Problems and Quirks.

Strategy Notes.

15. Simple Objects.

Getting Started with Objects.

Objects and Relational Tables.

Object Tables.

Problems and Quirks.

Strategy Notes.

16. Collection Objects.

Varrays.

Tables.

Transient Collections.

A Cautionary Tale.

Problems and Quirks.

Strategy Notes.

17. Handling Large Objects.

Internal or External?

Why LOBs?

Working with LOBs.

Working with BFILEs.

The LOB Package — DBMS_LOB.

BFILEs.

Permanent LOBs.

Temporary LOBs.

Generic LOBs.

Problems and Quirks.

Strategy Notes.

18. Data Integrity.

Types of Constraints.

Primary Key.

Unique Key.

Foreign Key.

Check.

View.

Scope.

Partition Boundaries.

Using Constraints.

Adding Constraints.

Truncating Tables.

Loading Data.

Cascading Changes to Primary Key.

Data Warehouses and Constraints.

Triggers.

Audit Trail.

Problems and Quirks.

Strategy Notes.

III. DATA MANIPULATION.

19. PL/SQL.

What Is PL/SQL?

The Best Bits.

Native Dynamic SQL.

Array Processing.

Passing Result Sets into and out of Procedures.

Invoker Rights.

Supplied Packages.

Problems and Quirks.

Strategy Notes.

20. Autonomous Transactions.

Simple Autonomous Transactions.

Autonomous Triggers.

Sequence Numbers.

Who Is Locking My Row?

A Counter Example.

Problems and Quirks.

Strategy Notes.

21. Row-level Security.

Historic Implementations.

Security Policies.

Refining Row-level Security.

Problems and Quirks.

Strategy Notes.

22. Parallel Query and Parallel Server.

Parallel Server.

The IDLM.

PCM and Non-PCM.

PCM Locks and Data Locks.

Defining PCM Locks.

Avoiding Pinging.

Parallel Execution.

Problems and Quirks.

Parallel Server.

Parallel Query.

Strategy Notes.

Parallel Server.

Parallel Query.

23. Number Crunching.

Cube and Rollup.

Programming Solutions.

Expensive SQL.

Temporary Tables.

Enhancements in Version 8.1.5.

Rollup.

Cube.

Analytic Functions.

Miscellaneous.

Case Statements.

SAMPLE Clause.

Materialized Views.

Implementation.

Problems and Quirks.

Strategy Notes.

24. Fallback.

Choose Your Disaster.

Pick a Time Scale.

The 30-Second 100% Fail-over.

The Five-Minute 100% Fail-over.

Off-site 100% Fail-Over.

Clones at 99%.

Backups.

The Standby Database.

Recovery Manager.

Problems and Quirks.

Strategy Notes.

Appendix A: Feature Reference.

Standby Database.

Row-level Security.

Tablespace Management.

Transportable Tablespaces.

Temporary Tablespaces.

Temporary Tables.

PL/SQL.

Database Triggers.

Partitioning.

Autonomous Transactions.

Three-tier Applications.

Indexes.

LOBs.

Analytic Functions (Version 8.1.6).

LogMiner.

Replication.

Query Rewrite.

IOTs.

Integrity Constraints.

Parallel Execution.

JServer.

Appendix B: Tuning to 90%.

V$SQL — Recent SQL with Costs.

V$FILESTAT/V$TEMPSTAT.

V$SYSTEM_EVENT/V$SESSION_EVENT.

The X$ Files.

X$KCBFWAIT.

X$KSQST.

Helping the Developers.

Conclusion.

Appendix C: Testing to Destruction.

The Basis of Testing.

A Cautionary Tale.

Generating Data.

Validating the Results.

Execution Paths.

Events.

Database Dumps.

Conclusion.

Appendix D: Space Management.

The Block.

INITRANS and MAXTRANS.

PCTFREE and PCTUSED.

Choosing a Block Size.

The Extent.

The Segment.

The Tablespace.

The Disk Array.

Conclusion.

About the Author.
Index. 0201715848T04062001.

Preface

Why Another Book?

Since there are so many books about Oracle already on the market, why have I bothered to sit down and add to the pile? In the age of Internet news groups and Web sites, it isn't for the fame. And given the specialized nature and likely circulation of such a tome, it probably isn't for the fortune.

Every now and again, usually while I've been rattling on enthusiastically about some obscure and esoteric feature of the way in which Oracle works, I've been asked, Why don't you write a book about Oracle since you know so much about it? My answer has always been the same: If you write a technical book about Oracle, it will be out of date by the time you've finished writing it, and within a year of publication it will be 20% misleading, inappropriate, or just plain wrong.

I have, however, finally given in to temptation because I've spent too long traveling around the world helping people to get the best out of their databases, and discovering time and again that the single biggest aid to success is to start well by picking the most appropriate features for the job.

This book is my attempt to tell you about some of the more useful things I have discovered while designing or fixing a few of the more thought-provoking databases that I have come across. I'm writing it partly for the challenge, and partly because I enjoy making Oracle work well and want to pass on some of the interesting and entertaining insights I have had. I hope you enjoy reading it and, more important, I hope you get a better feeling for what the Oracle database can do for you.

Who Is It For?

There are four stages to doing a job well:

  1. Knowing what can be done
  2. Knowing whether it should be done
  3. Being able to do it in theory
  4. Being able to do it in practice

Many of the books about Oracle currently on the market seem to focus on the finer points of the third and fourth steps. My aim is to help you with the first two, although this entails including practical observations relevant to the third and fourth steps.

This book does not exist to thrill the hard-core specialists by supplying subtle secrets and technical tweaks that will allow them to squeeze an extra half of a percent from their database. This book is here to help everyone get to a stage where they can put together a system that gives response times that are reasonable, considering the investment made in hardware, software, and human effort. Whether you are a manager, designer, database administrator, or programmer, there is something in this book for you. For the manager it gives a wide-ranging view of what Oracle is capable of and what you can expect your team to achieve. For the designer it outlines the possibilities offered by the many features of the relational database management system. For the database administrator it describes how using the right features correctly can make managing the database much easier. For the programmer (who is always keen to know how things really work) it makes it possible to connect the code that he writes to the features he is using, so that he can structure his code in the most appropriate way.

Which Version of Oracle?

A couple of years ago, a collection of information technology directors in the United Kingdom were asked what they perceived to be the biggest problems they had in managing their departments. Somewhere in the top ten was this response: the rate at which Oracle Corporation produces upgrades and new versions of their products. If Oracle keeps moving that fast, how do you pick a target when writing a book about it?

My strategy for tackling problems is the same regardless of the version of Oracle with which I'm working, so when you read this book you don't really have to worry about which version of Oracle you are using. However, I am going to focus as much as I can on Oracle 8.1.5--for the simple reason that it is the latest version (at least it was when I started writing).

It is also worth noting that Oracle 8.1.5 is the first "proper" release for some years to introduce many new features aimed at increasing the range of tasks that the database can handle efficiently and cost-effectively, which means, unfortunately, that it also introduces even more ways of allowing you to mix and match the wrong features.

Inevitably, between the time I started writing and the time this book was published, Oracle 8.1.6 went on general release. In that release, Oracle introduced features that it refers to as the analytic functions. The scope for reducing the programming effort and runtime workload on heavy-duty queries is so dramatic that I have felt compelled to include some details of analytic functions in Chapter 23.

What's in This Book?

Most of the books relating to Oracle seem to fall into one of three groups: the tuning guide, the enhanced manual, and the guide to relational database design. This book falls, I hope, outside all three groups. It works outward from the database engine itself and gives you some good ideas on how to use that engine to implement your application.

This book encourages you to consider just two important principles--how to think when designing an Oracle-based application, and how to ensure that you pick the most appropriate features of Oracle when implementing your system.

Whatever else it may be, though, this book is not a technical book. Or at least it's not a very technical book. I am not planning to go into any great and intricate detail about the internal workings of Oracle. (After all, I don't want the book to be out of date before it's published.) I do, however, take a little time to describe a couple of the central architectural features in some detail. I explain, in a simple way, the very small number of critical mechanisms that are key to the way in which the Oracle database engine works, and then I describe the ways in which these mechanisms can have a significant impact on how you have to design your application.

If you get to the end of this book feeling that it has made sense, then you are on track to avoid most of the traps that cause so many projects to end up overpriced, too complex, and poor performers.

What's Not in This Book?

There are a number of "value-added" modules that come with the Oracle relational database management system. In Oracle 8.1.5 these are known as the intermedia cartridges, and they are little applications that use the "extensible framework" of Oracle to add functionality for handling text, spatial data, time-based data, and visual data. These add-ons are excluded from this book.

I have also ignored the "Web-enabling" features of Oracle 8.1.5, namely the PL/SQL packages that can be called to pass data from Oracle tables to Web pages, the inclusion of Java as an internalized database language, and the Web application server itself. The Web interface is, after all, simply another way to use the database, and Java is just another programming language that can be used to address the database.

The last major omissions are advanced queuing and replication, partly because they are too wide ranging to be covered in a single chapter, and partly because they too fall into the area of the more exotic add-ons that are likely to be of less benefit to the general user.

Looking back at the last three paragraphs, I think they really sum up my approach to application design: The database is much more important than the language or tool that may be talking to it. And that, of course, is precisely why it is necessary for the designers and programmers to understand how the database works. It doesn't matter how wonderful the application is, or how high-tech the language is, or how user-friendly the interface is. If you try to make the database behave in an unsuitable fashion, then you are unlikely to come to the end of the project feeling like a winner.

The Framework of the Book

The book is designed as a series of self-contained essays. Each essay pulls together a number of threads that might otherwise be scattered across several of the Oracle manuals, and presents an entire topic in a fashion that helps you to identify the risks and rewards of using a particular feature of the software.

This means that there is a degree of repetition from time to time. For example, the chapter on partitioning mentions some details of parallel query, and the chapter on parallel query comments on its particular application to partitioned tables.

You may also find that there are apparent contradictions in some of the comments I make and advice that I give. At one point (Chapter 8) I describe the benefits of wasting space to reduce the administrative burden, but at another point (Chapter 13) I make several comments about rebuilding data objects to pack the data and save space. Sometimes such points are not as contradictory as they may at first seem. Sometimes it is simply the case that different demands on resources call for completely different strategies.

You may find that a number of technical issues are addressed in a rather more informal fashion than you might hope. My intention is to give the flavor of how Oracle works without worrying too much about the exact detail of the internal operations. If you are already a highly skilled operative fully conversant with the way Oracle works, please be patient. Many of the omissions and vagaries in the early stages of this book are deliberate.

The book is divided into three main parts:

  1. Part 1 (Chapters 1 through 4) is a very high-level view of the Oracle engine, how it should be approached, and why so many projects using Oracle fail to achieve their objectives.
  2. Part 2 (Chapters 5 through 18) approaches Oracle from the "static" viewpoint of how the data can be stored, packed, and made visible within the database.
  3. Part 3 (Chapters 19 through 24) is biased toward the "processing" side of Oracle, focusing more on the dynamic side of moving data in and around the database.

There are also four appendices:

  1. Appendix A is a brief summary of some of the more interesting features of Oracle 8.1.5. It contains a mixed collection of features that I think are useful. In some cases I have made a big fuss about a little feature; in other cases you may decide I have completely ignored a big feature. Just because I don't mention some new features doesn't mean they aren't of any use--it may simply mean that I haven't come across, or imagined, an environment in which they would have a significant impact on the quality, clarity, or performance of a project.
  2. Appendix B contains a brief description of the limited number of tuning tasks that should be adequate for most reasonably designed systems.
  3. Appendix C provides a few hints on techniques for testing the relevance of features.
  4. Appendix D contains a description of the main space management features of an Oracle database.


0201715848P04062001

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020