Oracle Essentials Oracle Database 10g

pdf
Số trang Oracle Essentials Oracle Database 10g 31 Cỡ tệp Oracle Essentials Oracle Database 10g 207 KB Lượt tải Oracle Essentials Oracle Database 10g 0 Lượt đọc Oracle Essentials Oracle Database 10g 0
Đánh giá Oracle Essentials Oracle Database 10g
4.4 ( 7 lượt)
Nhấn vào bên dưới để tải tài liệu
Đang xem trước 10 trên tổng 31 trang, để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

d 3r des Ora u cl In c on le8i iti Orac Ed le9i & What You Need to Know About Oracle Database Architecture and Features Oracle Essentials Oracle Database 10g Rick Greenwald, Robert Stackowiak & Jonathan Stern Chapter 1 CHAPTER 1 Introducing Oracle Where do we start? One of the problems in comprehending a massive product such as the Oracle database is the difficulty of getting a good sense of how the product works without getting lost in the details of implementing specific solutions. This book aims to solve this problem by giving you a thorough grounding in the concepts and technologies that form the foundation of the Oracle Database Server. Oracle also provides an Application Server and business applications, including the E-Business Suite and the Oracle Collaboration Suite,* which are outside the scope of the main body of this book. We’ve tried to write a book for a wide range of Oracle users, from the novice to the experienced user. To address this range of users, we’ve focused on the concepts and technology behind the Oracle database. Once you fully understand these facets of the product, you’ll be able to handle the particulars of virtually any type of Oracle database. Without this understanding, you may feel overburdened as you try to connect the dots of Oracle’s voluminous feature set and documentation. This first chapter lays the groundwork for the rest of the discussions in this book. Of all the chapters, it covers the broadest range of topics; most of these are discussed further later in the book, 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. Oracle has grown from its humble beginnings as one of a number of databases available in the 1970s to the market leader of today. In its early days, Oracle Corporation was known more as an aggressive sales and promotion organization than a technology supplier. Over the years, the Oracle database has grown in depth and quality, * Previous versions of this book did cover iFS. In Oracle Database 10g, however, this product is now known as Oracle Files and is now a part of the Oracle Collaboration Suite. For this reason, iFS is not covered in this edition. 1 This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. and its technical capabilities now are generally recognized as the most advanced. With each release, Oracle has added more power and features to its already solid base while improving the manageability. Several recent Oracle database releases are the focus of this book: Oracle8i Oracle8i, released in 1999, added a new twist to the Oracle database—a combination of enhancements that made the Oracle8i database the focal point of the world of Internet (the i in 8i) computing. Oracle9i Oracle9i, released in 2001, introduced Real Application Clusters as a replacement for Oracle Parallel Server, and added many management and data warehousing features. Oracle Database 10g Oracle Database 10g, released in 2003 and the current release, enables grid (the g in 10g) computing. A grid is simply a pool of computers that provides needed resources for applications on an as-needed basis. The goal is to provide computing resources that transparently scale to the user community, much as an electrical utility company can deliver power to meet peak demand by accessing energy from other power providers’ plants via a power grid. Oracle Database 10g further reduces 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. One important key to Oracle Database 10g’s usefulness in grid computing is the ability to provision CPUs and data. Before we dive into the specific foundations of these releases, we must spend a little time describing some Oracle basics—how databases evolved to arrive at the relational model, a brief history of Oracle Corporation, and an introduction to the basic features and configurations of the database. 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” appearing in 1970. Initially, it was unclear whether any system based on this concept could achieve commercial success. Nevertheless, Relational Software, Incorporated (RSI) began in 1977 and released Oracle V.2 as the world’s first relational database within a couple of years. By 1985, Oracle could claim more than 1,000 relational database customer sites. By comparison, IBM would not embrace relational technology in a commercial product until the Query Management Facility in 1983. 2 | Chapter 1: Introducing Oracle This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. Why has relational database technology grown to become the de facto database technology since that time? A look back at previous database technology may help to explain this phenomenon. Database management systems were first defined in the 1960s to provide a common organizational framework for what had been data stored in independent files. In 1964, Charles Bachman of General Electric proposed a network model with data records linked together, forming intersecting sets of data, as shown on the left in Figure 1-1. This work formed the basis of the CODASYL Data Base Task Group. Meanwhile, the North American Aviation’s Space Division and IBM developed a second approach based on a hierarchical model in 1965. In this model, data is represented as tree structures in a hierarchy of records, as shown on the right in Figure 1-1. IBM’s product based on this model was brought to market in 1969 as the Information Management System (IMS). As recently as 1980, almost all database implementations used either the network or hierarchical approach. Although several competitors utilized these technologies, only IMS remains. Figure 1-1. Network model (left) and hierarchical model (right) Relational Basics The relational database uses the concept of linked two-dimensional tables consisting of rows and columns, as shown in Figure 1-2. Unlike the hierarchical approach, no predetermined relationship exists between distinct tables. This means that the data needed to link together the different areas of the network or hierarchical model need not be defined. Because relational users don’t need to understand the representation of data in storage to retrieve it (many such users created ad hoc queries against the data), ease of use helped popularize the relational model. Relational programming is nonprocedural and operates on a set of rows at a time. In a master-detail relationship between tables, there can be one or many detail rows for The Evolution of the Relational Database This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. | 3 DEPTNO DEPTNAME LOCATION 10 20 30 40 Accounting Research Sales Operations San Francisco San Francisco Chicago Dallas EMPNO EMPNAME TITLE DEPTNO 71712 83321 85332 88888 Johnson Smith Stern Carter Clerk Mgr SC Mgr Mgr 10 20 30 10 Figure 1-2. Relational model with two tables each individual master row, yet the statements used to access, insert, or modify the data would simply describe the set of results. In many early relational databases, data access required the use of procedural languages that worked one record at a time. Because of this set orientation, programs can access more than one record in a relational database more easily. Relational databases can be used more productively to extract value from large groups of data. The contents of the rows in Figure 1-2 are sometimes referred to as records. A column within a row is referred to as a field. Tables are stored in a database schema, which is a logical organizational unit within the database. Other logical structures in the schema often include the following: Views Provide a single view of data derived from one or more tables or views. The view is an alternative interface to the data, which is stored in the underlying table(s) that make up the view. Sequences Provide unique numbers for column values. Stored procedures Contain logical modules that can be called from programs. Synonyms Provide alternative names for database objects. Indexes Provide faster access to table rows. Database links Provide links between distributed databases. 4 | Chapter 1: Introducing Oracle This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. The relationships between columns in different tables are typically described through the use of keys, which are implemented through referential integrity constraints and their supporting indexes. For example, in Figure 1-2, you can establish a link between the DEPTNO column in the second table, which is called a foreign key, to the DEPTNO column in the first table, which is referred to as the primary key of that table. Finally, even if you define many different indexes for a table, you don’t have to understand them or manage the data they contain. Oracle includes a query optimizer (described in Chapter 4) that chooses the best way to use your indexes to access the data for any particular query. The relational approach lent itself to the Structured Query Language (SQL). SQL was initially defined over a period of years by IBM Research, but it was Oracle Corporation that first introduced it to the market in 1979. SQL was noteworthy at the time for being the only language needed to use relational databases, because you could use SQL: • For queries (using a SELECT statement) • As a Data Manipulation Language or DML (using INSERT, UPDATE, and DELETE statements) • As a Data Definition Language or DDL (using CREATE or DROP statements when adding or deleting tables) • To set privileges for users or groups (using GRANT or REVOKE statements) Today, SQL contains many extensions with ANSI/ISO standards that define its basic syntax. How Oracle Grew In 1983, RSI was renamed Oracle Corporation to avoid confusion with a competitor named RTI. At this time, the developers made a critical decision to create a portable version of Oracle (Version 3) that ran not only on Digital VAX/VMS systems, but also on Unix and other platforms. By 1985, Oracle claimed the ability to run on more than 30 platforms. Some of these platforms are historical curiosities today, but others remain in use. (In addition to VMS, early operating systems supported by Oracle included IBM MVS, DEC Ultrix, HP/UX, IBM AIX, and Sun’s Solaris version of Unix.) Oracle was able to leverage and accelerate the growth of minicomputers and Unix servers in the 1980s. Today, Oracle is portable to both Microsoft Windows and Linux, which are the leading operating systems on popular commodity servers. In addition to multiple platform support, other core Oracle messages from the mid1980s still ring true today, including complementary software development and decision support tools, ANSI standard SQL across platforms, and connectivity over The Evolution of the Relational Database This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. | 5 standard networks. Since the mid-1980s, the database deployment model has evolved from dedicated database application servers to client/server to Internet computing implemented with PCs and thin clients accessing database applications via browsers—and, to the grid with Oracle Database 10g. Oracle introduced many innovative technical features to the database as computing and deployment models changed (from offering the first distributed database to the first Java Virtual Machine in the core database engine). Oracle also continues to support emerging standards such as XML and .NET. Table 1-1 presents a short list of Oracle’s major feature introductions. Table 1-1. History of Oracle technology introductions Year Feature 1979 Oracle Release 2—the first commercially available relational database to use SQL 1983 Single code base for Oracle across multiple platforms 1984 Portable toolset 1986 Client/server Oracle relational database 1987 CASE and 4GL toolset 1988 Oracle Financial Applications built on relational database 1989 Oracle6 1991 Oracle Parallel Server on massively parallel platforms 1993 Oracle7 with cost-based optimizer 1994 Oracle Version 7.1 generally available: parallel operations including query, load, and create index 1996 Universal database with extended SQL via cartridges, thin client, and application server 1997 Oracle8 generally available: including object-relational and Very Large Database (VLDB) features 1999 Oracle8i generally available: Java Virtual Machine (JVM) in the database 2000 Oracle9i Application Server generally available: Oracle tools integrated in middle tier 2001 Oracle9i Database Server generally available: Real Application Clusters; OLAP and data mining API in the database 2003 Oracle Database 10g enables grid computing and simplifies and automates key management tasks The Oracle Family Oracle Database 10g Database Server describes the most recent major version of the Oracle Relational Database Management System (RDBMS) family of products that share common source code. This family includes: • Personal Oracle, a database for single users that’s often used to develop code for implementation on other Oracle multiuser databases • Oracle Standard Edition, which was named Workgroup Server in its first iteration as part of the Oracle7 family and is sometimes simply referred to as Oracle Server 6 | Chapter 1: Introducing Oracle This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. • Oracle Enterprise Edition, which includes all Standard Edition functionality and additional functionality • Oracle Lite, used primarily for mobile applications Oracle8 was introduced in 1997 with larger size limitations and management features, such as partitioning, aimed at very large database implementations. In 1998, Oracle announced Oracle8i, which is sometimes referred to as Version 8.1 of the Oracle8 database. The i was added to denote added functionality supporting Internet deployment in the new version. Oracle9i followed, with Application Server available in 2000 and Database Server in 2001. Oracle Database 10g was introduced in 2003; the g denotes Oracle’s focus on emerging grid deployment models. The terms Oracle, Oracle8, Oracle8i, Oracle9i and Oracle Database 10g (or Oracle10g) might appear to be used somewhat interchangeably in this book, because Oracle Database 10g includes all the features of previous versions. When we describe a new feature that was first made available specifically in certain releases, we’ve tried to note that fact to avoid confusion, recognizing that many of you may have old releases of Oracle. We typically use the simple term Oracle when describing features that are common to all these releases. Oracle has focused development around a single source code model since 1983. While each database implementation includes some operating system–specific source code at very low levels in order to better leverage specific platforms, the interfaces that users, developers, and administrators deal with for each version are consistent. Because features are consistent across platforms for implementations of Oracle Standard Edition and Oracle Enterprise Edition, companies can migrate Oracle applications easily to various hardware vendors and operating systems while leveraging their investments in Oracle technology. This development strategy also enables Oracle to focus on implementing new features only once in its product set, instead of having to add functionality at different times to different implementations. Oracle Standard Edition Oracle Standard Edition refers to a specific database offering, once known as Workgroup Server. From a functionality and pricing standpoint, this product intends to compete in the entry-level multiuser and small database category, supporting smaller numbers of users. These releases are available today on Windows and Unix platforms such as HP Compaq, HP/UX, IBM AIX, Linux, and Sun Solaris. Oracle Enterprise Edition Oracle Enterprise Edition is aimed at larger-scale implementations that require additional features. Enterprise Edition is available on far more platforms than the Oracle release for workgroups and includes advanced management, networking, programming, and data warehousing features, as well as a variety of special-purpose options, such as clustering, which are available at extra cost. The Oracle Family This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. | 7 Oracle Personal Edition Oracle Personal Edition is the single-user version of Oracle Enterprise Edition. Personal Edition is most frequently used for development on a single machine. Because the features match those of Enterprise Edition, a developer can write applications using the Personal Edition and deploy them to multi-user servers. Some companies deploy single-user applications using this product. However, Oracle Lite offers a much more lightweight means of deploying the same applications. Oracle Lite Oracle Lite, once known as Oracle Mobile, is intended for single users who are using wireless/mobile devices. It differs from other members of the Oracle database family in that it doesn’t use the same database engine. Instead, Oracle developed a lightweight engine compatible with the limited memory and storage capacity of handheld devices. Oracle Lite is described in more detail at the end of this chapter. Because the SQL supported by Oracle Lite is largely the same as the SQL for other Oracle databases, you can run applications developed for those database engines using Oracle Lite. Replication of data between Oracle Lite and other Oracle versions is a key part of most implementations. Table 1-2 summarizes the situations in which you would typically use each database product. We’ve used the Oracle product names to refer to the different members of the Oracle database family. Table 1-2. Oracle family of database products Database name When appropriate Oracle Standard Edition Version of Oracle server for a small number of users and a smaller database Oracle Enterprise Edition Version of Oracle for a large number of users or a large database with advanced features for extensibility, performance, and management Oracle Personal Edition Single-user version of Oracle typically used for development of applications for deployment on other Oracle versions Oracle Lite Lightweight database engine for mobile computing on notebooks and handheld devices Summary of Oracle Features The Oracle database is a broad and powerful product. The remainder of this book examines different aspects of Oracle such as data structures, performance, and parallel processing. But before you can understand each of the different areas of Oracle in depth, you must familiarize yourself with the range of features in the Oracle database. 8 | Chapter 1: Introducing Oracle This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. The rest of this chapter gives you a high-level overview of the basic areas of functionality in the Oracle product family. By the end of this chapter, you will at least have some orientation points to guide you in exploring the topics in the rest of this book. To give some structure to the broad spectrum of the Oracle database, we’ve organized the features into the following sections: • Database application development features • Database connection features • Distributed database features • Data movement features • Performance features • Database management features At the end of each of the following sections describing database features we’ve included a subsection called “Availability,” which indicates the availability of each feature in specific Oracle products. You should be aware that as this feature list grows and Oracle implements packaging changes in new versions, the availability of these features in the version you implement may vary slightly. In this chapter, we’ve included a lot of terminology and rather abbreviated descriptions of features. Oracle is a huge system. Our goal here is to quickly familiarize you with the full range of features in the system. Subsequent chapters will provide additional details. Obviously, though, whole books can be (and have been!) written about each of the feature areas summarized here. Database Application Development Features The main use of the Oracle database system is to store and retrieve data for applications. The features of the Oracle database and related products described in this section are used to create applications. We’ve divided the discussion in this section into two categories: database programming and database extensibility options. Later in this chapter, we describe the Oracle Developer Suite, a set of optional tools used in Oracle Database Server and Oracle Application Server development. Database Programming All flavors of the Oracle database include different languages and interfaces that allow programmers to access and manipulate the data in the database. Database programming features usually interest two groups: developers building Oracle-based applications that will be sold commercially, and IT organizations within companies that custom-develop applications unique to their businesses. The following sections describe the languages and interfaces supported by Oracle. Database Application Development Features This is the Title of the Book, eMatter Edition Copyright © 2004 O’Reilly & Associates, Inc. All rights reserved. | 9
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.