1. Trang chủ
  2. » Công Nghệ Thông Tin

Oracle® Database Concepts doc

556 10,8K 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 556
Dung lượng 8,69 MB

Nội dung

Oracle® Database Concepts 11g Release 1 (11.1) B28318-06 January 2011 Oracle Database Concepts, 11g Release 1 (11.1) B28318-06 Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved. Primary Author: Richard Strohm Contributing Authors: Lance Ashdown, Mark Bauer, Michele Cyran, Steve Fogel, Janis Greenberg, Sumit Jeloka, Paul Lane, Diana Lorentz, Jack Melnick, Sheila Moore, Antonio Romero, Vivian Schupmann, Cathy Shea, Douglas Williams Contributors: Omar Alonso, Penny Avril, Hermann Baer, Sandeepan Banerjee, Bill Bridge, Sandra Cheevers, Carol Colrain, Vira Goorah, Mike Hartstein, John Haydu, Wei Hu, Ramkumar Krishnan, Vasudha Krishnaswamy, Bill Lee, Bryn Llewellyn, Rich Long, Paul Manning, Mughees Minhas, Valarie Moore, Gopal Mulagund, Muthu Olagappan, Jennifer Polk, Kathy Rich, John Russell, Bob Thome, Randy Urbano, Mark Van de Wiel, Michael Verheij, Ron Weiss, Steve Wertheimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065. This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services. iii Contents Preface xxv Audience xxv Documentation Accessibility xxv Related Documentation xxvi Conventions xxvi Part I What Is Oracle? 1 Introduction to Oracle Database Oracle Database Architecture 1-1 Overview of Grid Architecture 1-2 Overview of Application Architecture 1-2 Client/Server Architecture 1-2 Multitier Architecture: Application Servers 1-3 Multitier Architecture: Service-Oriented Architecture 1-3 Overview of Physical Database Structures 1-3 Datafiles 1-4 Control Files 1-4 Online Redo Log Files 1-5 Archived Redo Log Files 1-5 Parameter Files 1-5 Alert and Trace Log Files 1-5 Backup Files 1-6 Overview of Logical Database Structures 1-6 Oracle Database Data Blocks 1-6 Extents 1-6 Segments 1-7 Tablespaces 1-7 Overview of Schemas and Common Schema Objects 1-8 Tables 1-8 Indexes 1-8 Views 1-8 Clusters 1-9 Synonyms 1-9 Overview of the Oracle Database Data Dictionary 1-9 iv Overview of the Oracle Database Instance 1-9 Oracle Database Background Processes 1-10 Instance Memory Structures 1-11 Overview of Accessing the Database 1-11 Network Connections 1-11 Starting Up the Database 1-12 How Oracle Database Works 1-12 Overview of Oracle Database Utilities 1-13 Oracle Database Features 1-13 Overview of Oracle Real Application Testing 1-13 Database Replay 1-13 SQL Performance Analyzer 1-14 Overview of Concurrency Features 1-14 Concurrency 1-15 Read Consistency 1-15 Caching Mechanisms 1-16 Locking Mechanisms 1-16 Overview of Manageability Features 1-17 Self-Managing Database 1-17 Automatic Maintenance Tasks 1-17 Oracle Enterprise Manager 1-17 SQL Developer and SQL*Plus 1-18 Automatic Memory Management 1-18 Automatic Storage Management 1-18 Automatic Database Diagnostic Monitor 1-19 SQL Tuning Advisor 1-19 SQL Access Advisor 1-19 Streams Tuning Advisor 1-20 The Scheduler 1-20 Database Resource Manager 1-20 Overview of Diagnosability Features 1-20 Overview of Database Backup and Recovery Features 1-20 Overview of High Availability Features 1-22 Overview of Business Intelligence Features 1-23 Data Warehousing 1-23 Materialized Views 1-24 Table Compression 1-24 Parallel E x ecution 1-25 Analytic SQL 1-25 OLAP Capabilities 1-25 Data Mining 1-25 Very Large Databases (VLDB) 1-25 Overview of Content Management Features 1-26 XML in Oracle Database 1-26 LOBs 1-27 SecureFiles 1-27 Oracle Text 1-29 v Oracle Ultra Search 1-29 Oracle Multimedia 1-29 Oracle Spatial 1-29 Overview of Security Features 1-30 Security Mechanisms 1-30 Overview of Data Integrity and Triggers 1-31 Integrity Constraints 1-31 Triggers 1-32 Overview of Information Integration Features 1-32 Distributed SQL 1-32 Oracle Streams 1-33 Oracle Database Gateways and Generic Connectivity 1-34 Oracle Database Application Development 1-34 Overview of Oracle SQL 1-35 SQL Statements 1-35 Overview of PL/SQL 1-36 Overview of Java 1-37 Overview of Application Programming Languages (APIs) 1-37 Overview of Application Development Environments 1-37 Overview of Datatypes 1-38 Overview of Globalization 1-39 Part II Oracle Database Architecture 2 Data Blocks, Extents, and Segments Introduction to Data Blocks, Extents, and Segments 2-1 Overview of Data Blocks 2-3 Data Block Format 2-3 Header (Common and Variable) 2-4 Table Directory 2-4 Row Directory 2-4 Overhead 2-4 Row Data 2-4 Free Space 2-4 Free Space Management 2-5 Availability and Optimization of Free Space in a Data Block 2-5 Row Chaining and Migrating 2-5 PCTFREE, PCTUSED, and Row Chaining 2-6 The PCTFREE Parameter 2-6 The PCTUSED Parameter 2-7 How PCTFREE and PCTUSED Work Together 2-8 Overview of Extents 2-10 When Extents Are Allocated 2-10 Determine the Number and Size of Extents 2-10 How Extents Are Allocated 2-11 When Extents Are Deallocated 2-11 vi Extents in Nonclustered Tables 2-12 Extents in Clustered Tables 2-12 Extents in Materialized Views and Their Logs 2-13 Extents in Indexes 2-13 Extents in Temporary Segments 2-13 Extents in Rollback Segments 2-13 Overview of Segments 2-13 Introduction to Data Segments 2-14 Introduction to Index Segments 2-14 Introduction to Temporary Segments 2-14 Operations that Require Temporary Segments 2-15 Segments in Temporary Tables and Their Indexes 2-15 How Temporary Segments Are Allocated 2-15 Introduction to Undo Segments and Automatic Undo Management 2-16 Manual Undo Management 2-17 Undo Quota 2-17 Automatic Undo Retention 2-17 3 Tablespaces, Datafiles, and Control Files Introduction to Tablespaces, Datafiles, and Control Files 3-1 Oracle-Managed Files 3-2 Allocate More Space for a Database 3-2 Overview of Tablespaces 3-4 Bigfile Tablespaces 3-5 Benefits of Bigfile Tablespaces 3-5 Considerations with Bigfile Tablespaces 3-6 The SYSTEM Tablespace 3-6 The Data Dictionary 3-6 PL/SQL Program Units Description 3-6 The SYSAUX Tablespace 3-7 Undo Tablespaces 3-7 Creation of Undo Tablespaces 3-8 Default Temporary Tablespace 3-8 How to Specify a Default Temporary Tablespace 3-8 Using Multiple Tablespaces 3-8 Managing Space in Tablespaces 3-9 Locally Managed Tablespaces 3-9 Segment Space Management in Locally Managed Tablespaces 3-10 Dictionary Managed Tablespaces 3-10 Multiple Block Sizes 3-11 Online and Offline Tablespaces 3-11 Bringing Tablespaces Offline 3-11 Read-Only Tablespaces 3-12 Temporary Tablespaces 3-12 Sort Segments 3-13 Creation of Temporary Tablespaces 3-13 Transport of Tablespaces Between Databases 3-13 vii Tablespace Repository 3-14 How to Move or Copy a Tablespace to Another Database 3-14 Overview of Datafiles 3-15 Datafile Contents 3-15 Size of Datafiles 3-16 Offline Datafiles 3-16 Temporary Datafiles 3-16 Overview of Control Files 3-17 Control File Contents 3-17 Multiplexed Control Files 3-18 4 Transaction Management Introduction to Transactions 4-1 Statement Execution and Transaction Control 4-2 Statement-Level Rollback 4-3 Resumable Space Allocation 4-3 Overview of Transaction Management 4-4 Commit Transactions 4-4 Rollback of Transactions 4-5 Savepoints In Transactions 4-6 Transaction Naming 4-7 How Transactions Are Named 4-7 Commit Comment 4-7 The Two-Phase Commit Mechanism 4-8 Overview of Autonomous Transactions 4-8 Autonomous PL/SQL Blocks 4-9 Transaction Control Statements in Autonomous Blocks 4-9 5 Schema Objects Introduction to Schema Objects 5-1 Overview of Tables 5-3 How Table Data Is Stored 5-4 Row Format and Size 5-5 Rowids of Row Pieces 5-7 Column Order 5-7 Table Compression 5-7 Using Table Compression 5-8 Nulls Indicate Absence of Value 5-8 Default Values for Columns 5-9 Partitioned Tables 5-10 Nested Tables 5-10 Temporary Tables 5-10 Segment Allocation 5-11 Parent and Child Transactions 5-11 External Tables 5-12 The Access Driver 5-12 viii Data Loading with External Tables 5-12 Parallel Access to External Tables 5-13 Overview of Views 5-13 How Views are Stored 5-14 How Views Are Used 5-15 Mechanics of Views 5-15 Globalization Support Parameters in Views 5-16 Use of Indexes Against Views 5-16 Dependencies and Views 5-16 Updatable Join Views 5-17 Object Views 5-17 Inline Views 5-17 Overview of Materialized Views 5-18 Define Constraints on Views 5-19 Refresh Materialized Views 5-19 Materialized View Logs 5-20 Overview of Dimensions 5-20 Overview of the Sequence Generator 5-21 Overview of Synonyms 5-22 Overview of Indexes 5-23 Unique and Nonunique Indexes 5-24 Visible and Invisible Indexes 5-24 Composite Indexes 5-24 Indexes and Keys 5-25 Indexes and Nulls 5-25 Function-Based Indexes 5-26 Uses of Function-Based Indexes 5-26 Optimization with Function-Based Indexes 5-27 Dependencies of Function-Based Indexes 5-27 How Indexes Are Stored 5-28 Format of Index Blocks 5-28 The Internal Structure of Indexes 5-28 Index Properties 5-29 Advantages of B-tree Structure 5-30 Index Unique Scan 5-30 Index Range Scan 5-30 Key Compres s ion 5-30 Prefix and Suffix Entries 5-31 Performance and Storage Considerations 5-31 Uses of Key Compression 5-31 Reverse Key Indexes 5-32 Bitmap Indexes 5-32 Benefits for Data Warehousing Applications 5-33 Cardinality 5-33 Bitmap Index Example 5-34 Bitmap Indexes and Nulls 5-35 Bitmap Indexes on Partitioned Tables 5-35 ix Bitmap Join Indexes 5-36 Overview of Index-Organized Tables 5-36 Benefits of Index-Organized Tables 5-37 Index-Organized Tables with Row Overflow Area 5-38 Secondary Indexes on Index-Organized Tables 5-38 Bitmap Indexes on Index-Organized Tables 5-39 Mapping Table 5-39 Partitioned Index-Organized Tables 5-40 B-tree Indexes on UROWID Columns for Heap- and Index-Organized Tables 5-40 Index-Organized Table Applications 5-40 Overview of Application Domain Indexes 5-40 Overview of Clusters 5-41 Overview of Hash Clusters 5-42 6 Schema Object Dependencies Overview of Schema Object Dependencies 6-1 Querying Object Dependencies 6-4 Object Status 6-4 Invalidation of Dependent Objects 6-4 Session State and Referenced Packages 6-8 Security Authorization 6-8 Guidelines for Reducing Invalidation 6-8 Add New Items to End of Package 6-8 Reference Each Table Through a View 6-8 Object Revalidation 6-9 Name Resolution in Schema Scope 6-10 Local Dependency Management 6-11 Remote Dependency Management 6-11 Dependencies Among Local and Remote Database Procedures 6-11 Dependencies Among Other Remote Objects 6-11 Dependencies of Applications 6-12 Remote Procedure Call (RPC) Dependency Management 6-12 Time-Stamp Checking 6-12 Signature Checking 6-14 Switching Datatype Classes 6-16 Examples of Changing Procedure Signatures 6-17 Controlling Remote Dependencies 6-18 Dependency Resolution 6-19 Suggestions for Managing Dependencies 6-20 Shared SQL Dependency Management 6-20 7 The Data Dictionary Introduction to the Data Dictionary 7-1 Structure of the Data Dictionary 7-2 SYS, Owner of the Data Dictionary 7-2 How the Data Dictionary Is Used 7-2 x How Oracle Database Uses the Data Dictionary 7-2 Public Synonyms for Data Dictionary Views 7-3 Cache the Data Dictionary for Fast Access 7-3 Other Programs and the Data Dictionary 7-3 How to Use the Data Dictionary 7-3 Views with the Prefix USER 7-4 Views with the Prefix ALL 7-4 Views with the Prefix DBA 7-5 The DUAL Table 7-5 Dynamic Performance Tables 7-5 Database Object Metadata 7-5 8 Memory Architecture Introduction to Oracle Database Memory Structures 8-1 Basic Memory Structures 8-1 Overview of the System Global Area 8-2 Database Buffer Cache 8-3 Organization of the Database Buffer Cache 8-3 The LRU Algorithm and Full Table Scans 8-4 Redo Log Buffer 8-4 Shared Pool 8-4 Library Cache 8-5 Dictionary Cache 8-7 Result Cache 8-7 Large Pool 8-8 Java Pool 8-9 Streams Pool 8-9 Overview of the Program Global Area 8-9 Content of the PGA 8-9 Session Memory 8-9 Private SQL Area 8-10 PGA Memory Use in Dedicated and Shared Server Modes 8-11 Overview of Memory Management Methods 8-12 About Software Code Areas 8-14 9 Process Architecture Introduction to Processes 9-1 Multiple-Process Oracle Systems 9-1 Types of Processes 9-2 Overview of User Processes 9-3 Connections and Sessions 9-3 Overview of Oracle Database Processes 9-3 Oracle Database Server Processes 9-4 Oracle Database Background Processes 9-4 Archiver Processes (ARCn) 9-5 Checkpoint Process (CKPT) 9-6 Database Writer Process (DBWn) 9-6 [...]... Documentation ■ Conventions Audience Oracle Database Concepts is intended for database administrators, system administrators, and database application developers To use this document, you must know the following: ■ Relational database concepts in general ■ Concepts and terminology in Chapter 1, "Introduction to Oracle Database" ■ The operating system environment under which you are running Oracle Documentation... overview of Oracle Database concepts and terminology It contains the following chapter: ■ Chapter 1, "Introduction to Oracle Database" 1 Introduction to Oracle Database This chapter provides an overview of the Oracle database server The topics include: ■ Oracle Database Architecture ■ Oracle Database Features ■ Oracle Database Application Development Oracle Database Architecture A database is a collection... performance of an Oracle database Oracle Database Data Warehousing Guide for information about data warehousing and business intelligence Oracle Database Utilities for information about the utilities mentioned in this document Many books in the documentation set use the sample schemas of the seed database, which is installed by default when you install Oracle Refer to Oracle Database Sample Schemas... Related Documentation For more information, see these Oracle resources: ■ ■ ■ ■ ■ ■ Oracle Database Upgrade Guide for information about upgrading a previous release of Oracle Oracle Database Administrator's Guide for information about how to administer the Oracle database server Oracle Database Advanced Application Developer's Guide for information about developing Oracle database applications Oracle Database. .. opened for database operation to proceed If the physical makeup of the database is altered (for example, if a new datafile or redo log file is created), then the control file is automatically modified by Oracle Database to reflect the change A control file is also used in database recovery See Also: 1-4 Oracle Database Concepts Chapter 3, "Tablespaces, Datafiles, and Control Files" Oracle Database Architecture... Overview of Logical Database Structures ■ Overview of Schemas and Common Schema Objects ■ Overview of the Oracle Database Data Dictionary ■ Overview of the Oracle Database Instance ■ Overview of Accessing the Database ■ Overview of Oracle Database Utilities Introduction to Oracle Database 1-1 Oracle Database Architecture Overview of Grid Architecture Grid computing is an information technology (IT) architecture... Beginning with Oracle Database 11g, Oracle Database can act as a Web service provider in a traditional multitier or SOA environment See Also: ■ ■ "Oracle Database as a Web Service Provider" on page 10-5 for more information about Oracle Database as a Web service provider Oracle XML DB Developer's Guide for more information about using Web services with the database Overview of Physical Database Structures... How a Database Is Mounted How a Database Is Mounted with Oracle Real Application Clusters How a Clone Database Is Mounted What Happens When You Open a Database Crash and Instance Recovery Undo Space Acquisition and Management Resolution of In-Doubt Distributed Transaction Open a Database in Read-Only Mode Overview of Database. .. Oracle Database data is stored in data blocks One data block corresponds to a specific number of bytes of physical database space on disk The standard block size is specified by the DB_BLOCK_SIZE initialization parameter In addition, you can specify up to four other block sizes A database uses and allocates free database space in Oracle Database data blocks Extents The next level of logical database. .. of large, static portions of a database Oracle Database never updates the files of a read-only tablespace, and therefore the files can reside on read-only media such as CD-ROMs or WORM drives Introduction to Oracle Database 1-7 Oracle Database Architecture Overview of Schemas and Common Schema Objects A schema is a collection of database objects A schema is owned by a database user and has the same . Oracle® Database Concepts 11g Release 1 (11.1) B28318-06 January 2011 Oracle Database Concepts, 11g Release 1 (11.1) B28318-06 Copyright. Database 1-11 Network Connections 1-11 Starting Up the Database 1-12 How Oracle Database Works 1-12 Overview of Oracle Database Utilities 1-13 Oracle Database

Ngày đăng: 07/03/2014, 23:20