Read Oracle Essentials Oracle Database 11g Online
Authors: Rick Greenwald
UPPERCASE
Generally indicates Oracle keywords
lowercase
In code examples, generally indicates user-defined items such as variables This icon indicates a tip, suggestion, or general note. For example, we’ll tell youif youneed to use a particular version of Oracle or if an operation requires certain privileges.
This icon indicates a warning or caution. For example, we’ll tell you if Oracle doesn’t behave as you’d expect or if a particular operation negatively impacts performance.
How to Contact Us
Please address comments and questions concerning this book to the publisher: O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938 (in the United States or Canada)
707-829-0515 (international/local)
707-829-0104 (fax)
There is a web page for this book, which lists errata, the text of several helpful technical papers, and any additional information. You can access this page at:
http://www.oreilly.com/catalog/9780596514549
To comment or ask technical questions about this book, send email to:
For more information about books, conferences, software, Resource Centers, and the O’Reilly Network, see the O’Reilly web site at:
Using Code Examples
This book is here to help youget your job done. In general, youmay use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books
does
require permission. Answering a question by citing this book and quoting example
xvi
|
Preface
code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation
does
require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “
Oracle Essentials: Oracle Database
11g
, Fourth Edition, by Rick Greenwald, Robert Stackowiak, and Jonathan Stern.
Copyright 2008 O’Reilly Media Inc., 978-0-596-51454-9.”
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at
[email protected]
.
Safari® Books Online
When yousee a Safari® Books Online icon on the cover of your favorite technology book, that means the book is available online through the O’Reilly Network Safari Bookshelf.
Safari offers a solution that’s better than e-books. It’s a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it for free at
http://safari.oreilly.com
.
Acknowledgments
Each of the authors has arrived at this collaboration through a different path, but we would all like to thank the team at O’Reilly for making this book both possible and a joy to write. We’d like to thank our first editor for this edition, Colleen Gorman, and the rest of the O’Reilly crew, especially Sumita Mukherji, the production editor; Rob Romano, who developed the figures; and Shan Young, who wrote the index. Also, we’d like to thank our editor from the first three editions, Debby Russell, who was among the first to see the value in such a book and who stepped in to perform final editing on the fourth edition as well. It’s incredible how all of these folks were able to strike the perfect balance—always there when we needed something, but leaving us alone when we didn’t.
We’re all grateful to each other. Giving birth to a book is a difficult process, but it can be harrowing when split three ways. Everyone hung in there and did their best throughout this process. We’d also like to give our sincere thanks to the technical reviewers for the fourth edition of this book: Darryl Hurley, Dwayne King, Arup Nanda, and Bert Scalzo. Thanks as well to reviewers of previous editions: Craig Shallahamer of OraPub, Domenick Ficarella, Jonathan Gennick, Jenny Gelhausen, and Dave Klein. This crucially important work really enhanced the value of the book you’re reading. And thanks as well to Lance Ashdown for clarifying Oracle database writes.
Preface
|
xvii
Rick thanks the incredibly bright and gifted people who have shared their wealth of knowledge with him over the years, including Bruce Scott, Earl Stahl, Jerry Chang, and Jim Milbery. In particular, he thanks the two individuals who have been his technical mentors over the course of his entire career: Ed Hickland and Dave Klein, who have repeatedly spent time explaining to and discussing with him some of the broader and finer points of database technology.
For the later editions of this book, Rick would also like to thank all those colleagues at Oracle who helped him in his time of need, checking on those last-minute clarifi-cations, including John Lang, Bruce Lowenthal, Alice Watson, Dave Leroy, Sushil Kumar, Mughees Minhas, Daniela Hansell, Penny Avril, Mark Townsend, and Mark Drake. And a special thank-youto Jenny Tsai-Smith, who always seemed to have the time and knowledge to clear up any Oracle database problem. And last, but certainly not least, his primary coauthor, Bob Stackowiak, who has become a good friend over the years of collaboration.
Bob acknowledges all his friends over the years around the world at Oracle Corporation, and from earlier stints at IBM, Harris Computer Systems, and the U.S. Army Corps of Engineers. Through personal relationships and email, they have shared a lot and provided him with incredible opportunities for learning. At Oracle, he especially thanks members of Andy Mendelsohn’s team who have always been helpful in providing material ahead of releases, including Mark Townsend, Raymond Roccaforte, George Lumpkin, Hermann Baer, and many others. Bob also extends special thanks to his team in Oracle’s Technology Business Unit that includes Louis Nagode, Jim Bienski, Gayl Czaplicki, Alan Manewitz, Joan Maiorana, Sandrine Ost, and Max Riv-era. His management continues to recognize the value of such projects, including Mark Salser and Paul Cross. He’d also like to thank his customers, who have always had the most practical experience using the products and tools he has worked with and from whom he continues to learn. Finally, both Bob and Rick would like to thank Sheila Cepero for adding them to the Oracle Database 11
g
beta program, an important factor in enabling this book to appear so shortly after the initial release of the new database version.
In earlier editions, Jonathan thanked many of his professional contacts in previous editions, including Murray Golding, Sam Mele, and the Oracle Server Technologies members and their teams, including Juan Tellez, Ron Weiss, Juan Loaiza, and Carol Colrain for their help during his years at Oracle. And we thank him for all that he gave us in too short a life.
xviii
|
Preface
Chapter 1
CHAPTER 1
Introducing Oracle1
Where do we start? One of the problems in comprehending a massive product such as the Oracle database is getting a good sense of how the product works without getting lost in the details. This book aims to provide a thorough grounding in the concepts and technologies that form the foundation of Oracle’s Database Server, currently known as Oracle Database 11
g
. The book is intended for a wide range of Oracle database administrators, developers, and users, from the novice to the experienced. It is our hope that once you have this basic understanding of the product, you’ll be able to connect the dots when using Oracle’s voluminous feature set, documentation, and the many other books and publications that describe the database.
Oracle also offers an Application Server and Fusion Middleware, business intelligence tools, and business applications (the E-Business Suite, PeopleSoft, JD
Edwards, Siebel, Hyperion, and Project Fusion). Since this book is focused on the database, we will touch on these as they relate to specific Oracle database topics covered.
This first chapter lays the groundwork for the rest of the book. Of all the chapters, it covers the broadest range of topics. Most of these topics are discussed later in more depth, but some of the basics—for example, the brief history of Oracle and the contents of the different “flavors” of the Oracle database products—are unique to this chapter.
Over the past 30 years, Oracle grew from being one of many vendors that developed and sold a database product to being widely recognized as the database market leader. Although early products were typical of a startup company, the Oracle database quality and depth grew such that its technical capabilities are now often viewed as the most advanced in the industry. With each database release, Oracle has improved the scalability, functionality, and manageability of the database.
1
This book is now in its fourth edition. This edition, like the second and third editions, required many changes since the database has changed a great deal over this time. Highlights of Oracle releases include:
• Oracle8 (released in 1997) improved the performance and scalability of the database and added the ability to create and store objects in the database.
• Oracle8
i
(released in 1999) added a new twist to the Oracle database—a combination of enhancements that made the Oracle8
i
database a focal point in the world of Internet computing.
• Oracle9
i
(released in 2001) introduced Real Application Clusters as a replacement for Oracle Parallel Server and added many management and data warehousing features.
• Oracle Database 10
g
(released in 2003) enabled deployment of “grid” computing. A
grid
is simply a pool of computers and software resources providing resources for applications on an as-needed basis. To support this style of computing, Oracle added the ability to provision CPUs and data. Oracle Database 10
g
also further reduced the time, cost, and complexity of database management through the introduction of self-managing features such as the Automated Database Diagnostic Monitor, Automated Shared Memory Tuning, Automated Storage Management, and Automated Disk Based Backup and Recovery.
• Oracle Database 11
g
(released in 2007) is the current release. Many of the self-tuning and managing capabilities are further improved, especially Automatic Memory Management, partitioning, and security. The lifecycle of database change management is extended within Oracle’s Enterprise Manager as Oracle now provides improved diagnosis capabilities and linkage to Oracle Support via a Support Workbench. This version also features improved online patching capabilities.
Before we dive into further details, let’s step back and look at how databases evolved, how we arrived at the relational model, and Oracle’s history. We’ll then take an initial look at Oracle database packaging and key Oracle features today.
The Evolution of the Relational Database
The relational database concept was described first by Dr. Edgar F. Codd in an IBM
research publication entitled “System R4 Relational” that was published in 1970.
Initially, it was unclear whether any system based on this concept could achieve commercial success. Nevertheless, a company named Software Development Laboratories Relational Software came into being in 1977 and then released a product
2
|
Chapter 1: Introducing Oracle
named Oracle V.2 as the world’s first commercial relational database within a couple of years (also changing its name to Relational Software, Incorporated). By 1985, Oracle could claim more than 1,000 relational database customer sites. Curiously, IBM would not embrace relational technology in a commercial product until the Query Management Facility in 1983.