Oracle® Database Concepts pot

542 1K 0
Oracle® Database Concepts pot

Đ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

Oracle® Database Concepts 10g Release 2 (10.2) B14220-02 October 2005 Oracle Database Concepts, 10g Release 2 (10.2) B14220-02 Copyright © 1993, 2005, Oracle. All rights reserved. Primary Author: Michele Cyran Contributing Author: Paul Lane, JP Polk Contributor: Omar Alonso, Penny Avril, Hermann Baer, Sandeepan Banerjee, Mark Bauer, Bill Bridge, Sandra Cheevers, Carol Colrain, Vira Goorah, Mike Hartstein, John Haydu, Wei Hu, Ramkumar Krishnan, Vasudha Krishnaswamy, Bill Lee, Bryn Llewellyn, Rich Long, Diana Lorentz, Paul Manning, Valarie Moore, Mughees Minhas, Gopal Mulagund, Muthu Olagappan, Jennifer Polk, Kathy Rich, John Russell, Viv Schupmann, Bob Thome, Randy Urbano, Michael Verheij, Ron Weiss, Steve Wertheimer The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States 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, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software—Restricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065 The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party. iii Contents Preface xxv Audience xxv Documentation Accessibility xxv Related Documentation xxvi Conventions xxvi Part I What Is Oracle? 1 Introduction to the Oracle Database Oracle Database Architecture 1-1 Overview of Oracle Grid Architecture 1-2 Grid Computing Defined 1-2 Grid Computing in Oracle Database 10g 1-5 Overview of Application Architecture 1-7 Client/Server Architecture 1-7 Multitier Architecture: Application Servers 1-7 Overview of Physical Database Structures 1-8 Datafiles 1-8 Control Files 1-8 Redo Log Files 1-9 Archive Log Files 1-9 Parameter Files 1-9 Alert and Trace Log Files 1-9 Backup Files 1-10 Overview of Logical Database Structures 1-10 Tablespaces 1-10 Oracle Data Blocks 1-10 Extents 1-11 Segments 1-11 Overview of Schemas and Common Schema Objects 1-12 Tables 1-12 Indexes 1-12 Views 1-12 Clusters 1-13 Synonyms 1-13 iv Overview of the Oracle Data Dictionary 1-13 Overview of the Oracle Instance 1-13 Real Application Clusters: Multiple Instance Systems 1-13 Instance Memory Structures 1-14 System Global Area 1-14 Program Global Area 1-15 Oracle Background Processes 1-15 Process Architecture 1-15 Overview of Accessing the Database 1-16 Network Connections 1-16 Starting Up the Database 1-16 How Oracle Works 1-17 Overview of Oracle Utilities 1-17 Oracle Database Features 1-17 Overview of Scalability and Performance Features 1-18 Concurrency 1-18 Read Consistency 1-18 Locking Mechanisms 1-19 Quiesce Database 1-20 Real Application Clusters 1-20 Portability 1-20 Overview of Manageability Features 1-21 Self-Managing Database 1-21 Oracle Enterprise Manager 1-21 SQL*Plus 1-21 Automatic Storage Management 1-21 The Scheduler 1-22 Database Resource Manager 1-22 Overview of Database Backup and Recovery Features 1-22 Types of Failures 1-22 Structures Used for Recovery 1-23 Overview of High Availability Features 1-24 Overview of Business Intelligence Features 1-25 Data Warehousing 1-25 Extraction, Transformation, and Loading (ETL) 1-25 Materialized Views 1-25 Bitmap Indexes in Data Warehousing 1-26 Table Compression 1-26 Parallel Execution 1-26 Analytic SQL 1-26 OLAP Capabilities 1-26 Data Mining 1-27 Partitioning 1-27 Overview of Content Management Features 1-27 XML in Oracle 1-27 LOBs 1-27 Oracle Text 1-28 v Oracle Ultra Search 1-28 Oracle interMedia 1-28 Oracle Spatial 1-28 Overview of Security Features 1-28 Security Mechanisms 1-29 Overview of Data Integrity and Triggers 1-29 Integrity Constraints 1-30 Keys 1-30 Triggers 1-30 Overview of Information Integration Features 1-31 Distributed SQL 1-31 Oracle Streams 1-31 Oracle Transparent Gateways and Generic Connectivity 1-33 Oracle Database Application Development 1-33 Overview of Oracle SQL 1-33 SQL Statements 1-33 Overview of PL/SQL 1-34 PL/SQL Program Units 1-35 Overview of Java 1-35 Overview of Application Programming Languages (APIs) 1-35 Overview of Transactions 1-36 Commit and Undo Transactions 1-37 Savepoints 1-37 Overview of Datatypes 1-37 Overview of Globalization 1-38 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-4 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 Overview of Extents 2-10 When Extents Are Allocated 2-10 vi Determine the Number and Size of Extents 2-10 How Extents Are Allocated 2-11 When Extents Are Deallocated 2-11 Extents in Nonclustered Tables 2-12 Extents in Clustered Tables 2-12 Extents in Materialized Views and Their Logs 2-12 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-13 Introduction to Index Segments 2-14 Introduction to Temporary Segments 2-14 Operations that Require Temporary Segments 2-14 Segments in Temporary Tables and Their Indexes 2-15 How Temporary Segments Are Allocated 2-15 Introduction to Automatic Undo Management 2-16 Undo Mode 2-16 Undo Quota 2-17 Automatic Undo Retention 2-17 External Views 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-6 Considerations with Bigfile Tablespaces 3-6 The SYSTEM Tablespace 3-6 The Data Dictionary 3-7 PL/SQL Program Units Description 3-7 The SYSAUX Tablespace 3-7 Undo Tablespaces 3-7 Creation of Undo Tablespaces 3-8 Assignment of Undo Tablespaces 3-8 Default Temporary Tablespace 3-8 How to Specify a Default Temporary Tablespace 3-8 Using Multiple Tablespaces 3-9 Managing Space in Tablespaces 3-9 Locally Managed Tablespaces 3-10 Segment Space Management in Locally Managed Tablespaces 3-10 Dictionary Managed Tablespaces 3-11 Multiple Block Sizes 3-11 Online and Offline Tablespaces 3-11 Bringing Tablespaces Offline 3-12 vii Use of Tablespaces for Special Procedures 3-12 Read-Only Tablespaces 3-13 Temporary Tablespaces for Sort Operations 3-13 Sort Segments 3-13 Creation of Temporary Tablespaces 3-14 Transport of Tablespaces Between Databases 3-14 Tablespace Repository 3-14 How to Move or Copy a Tablespace to Another Database 3-15 Overview of Datafiles 3-15 Datafile Contents 3-16 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-3 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-6 Column Order 5-6 Table Compression 5-7 Using Table Compression 5-7 Nulls Indicate Absence of Value 5-8 Default Values for Columns 5-8 Default Value Insertion and Integrity Constraint Checking 5-8 viii Partitioned Tables 5-9 Nested Tables 5-10 Temporary Tables 5-10 Segment Allocation 5-10 Parent and Child Transactions 5-11 External Tables 5-11 The Access Driver 5-11 Data Loading with External Tables 5-12 Parallel Access to External Tables 5-12 Overview of Views 5-13 How Views are Stored 5-13 How Views Are Used 5-14 Mechanics of Views 5-14 Globalization Support Parameters in Views 5-15 Use of Indexes Against Views 5-15 Dependencies and Views 5-15 Updatable Join Views 5-16 Object Views 5-16 Inline Views 5-16 Overview of Materialized Views 5-17 Define Constraints on Views 5-17 Refresh Materialized Views 5-18 Materialized View Logs 5-18 Overview of Dimensions 5-19 Overview of the Sequence Generator 5-19 Overview of Synonyms 5-20 Overview of Indexes 5-21 Unique and Nonunique Indexes 5-22 Composite Indexes 5-22 Indexes and Keys 5-23 Indexes and Nulls 5-23 Function-Based Indexes 5-24 Uses of Function-Based Indexes 5-24 Optimization with Function-Based Indexes 5-24 Dependencies of Function-Based Indexes 5-25 How Indexes Are Stored 5-26 Format of Index Blocks 5-26 The Internal Structure of Indexes 5-26 Index Properties 5-27 Advantages of B-tree Structure 5-28 Index Unique Scan 5-28 Index Range Scan 5-28 Key Compression 5-28 Prefix and Suffix Entries 5-28 Performance and Storage Considerations 5-29 Uses of Key Compression 5-29 Reverse Key Indexes 5-30 ix Bitmap Indexes 5-30 Benefits for Data Warehousing Applications 5-30 Cardinality 5-31 Bitmap Index Example 5-32 Bitmap Indexes and Nulls 5-33 Bitmap Indexes on Partitioned Tables 5-33 Bitmap Join Indexes 5-33 Overview of Index-Organized Tables 5-34 Benefits of Index-Organized Tables 5-35 Index-Organized Tables with Row Overflow Area 5-35 Secondary Indexes on Index-Organized Tables 5-36 Bitmap Indexes on Index-Organized Tables 5-36 Mapping Table 5-36 Partitioned Index-Organized Tables 5-37 B-tree Indexes on UROWID Columns for Heap- and Index-Organized Tables 5-37 Index-Organized Table Applications 5-37 Overview of Application Domain Indexes 5-37 Overview of Clusters 5-38 Overview of Hash Clusters 5-40 6 Dependencies Among Schema Objects Introduction to Dependency Issues 6-1 Resolution of Schema Object Dependencies 6-3 Compilation of Views and PL/SQL Program Units 6-4 Views and Base Tables 6-4 Program Units and Referenced Objects 6-5 Data Warehousing Considerations 6-5 Session State and Referenced Packages 6-5 Security Authorizations 6-6 Object Name Resolution 6-6 Shared SQL Dependency Management 6-6 Local and Remote Dependency Management 6-7 Management of Local Dependencies 6-7 Management of Remote Dependencies 6-7 Dependencies Among Local and Remote Database Procedures 6-7 Dependencies Among Other Remote Schema Objects 6-9 Dependencies of Applications 6-9 7 The Data Dictionary Introduction to the Data Dictionary 7-1 Structure of the Data Dictionary 7-2 Base Tables 7-2 User-Accessible Views 7-2 SYS, Owner of the Data Dictionary 7-2 How the Data Dictionary Is Used 7-2 How Oracle Uses the Data Dictionary 7-2 x 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-4 The DUAL Table 7-4 Dynamic Performance Tables 7-5 Database Object Metadata 7-5 8 Memory Architecture Introduction to Oracle Memory Structures 8-1 Overview of the System Global Area 8-2 The SGA_MAX_SIZE Initialization Parameter 8-3 Automatic Shared Memory Management 8-4 The SGA_TARGET Initialization Parameter 8-5 Automatically Managed SGA Components 8-5 Manually Managed SGA Components 8-6 Persistence of Automatically Tuned Values 8-6 Adding Granules and Tracking Component Size 8-6 Database Buffer Cache 8-7 Organization of the Database Buffer Cache 8-7 The LRU Algorithm and Full Table Scans 8-8 Size of the Database Buffer Cache 8-8 Multiple Buffer Pools 8-9 Redo Log Buffer 8-10 Shared Pool 8-10 Library Cache 8-10 Shared SQL Areas and Private SQL Areas 8-10 PL/SQL Program Units and the Shared Pool 8-11 Dictionary Cache 8-11 Allocation and Reuse of Memory in the Shared Pool 8-11 Large Pool 8-13 Java Pool 8-13 Streams Pool 8-13 Control of the SGA’s Use of Memory 8-14 Other SGA Initialization Parameters 8-14 Physical Memory 8-14 SGA Starting Address 8-14 Extended Buffer Cache Mechanism 8-14 Overview of the Program Global Areas 8-14 Content of the PGA 8-15 Private SQL Area 8-15 Session Memory 8-16 SQL Work Areas 8-16 PGA Memory Management for Dedicated Mode 8-16 [...]... of Oracle Database concepts and terminology It contains the following chapter: ■ Chapter 1, "Introduction to the Oracle Database" 1 Introduction to the 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 An Oracle database is... Accessibility ■ Related Documentation ■ Conventions Audience Oracle Database Concepts is intended for database administrators, system administrators, and database application developers To use this document, you need to know the following: ■ Relational database concepts in general ■ Concepts and terminology in Chapter 1, "Introduction to the Oracle Database" ■ The operating system environment under which you... 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 Application Developer's Guide - Fundamentals for information about developing Oracle database applications Oracle Database Performance Tuning Guide for information... How a Database Is Mounted How a Database Is Mounted with Real Application Clusters How a Standby Database Is Mounted How a Clone Database Is Mounted What Happens When You Open a Database Instance Recovery Undo Space Acquisition and Management Resolution of In-Doubt Distributed Transaction Open a Database in Read-Only... Overview of Database and Instance Shutdown Close a Database Close the Database by Terminating the Instance Unmount a Database Shut Down an Instance Abnormal Instance Shutdown Part III 13 12-1 12-2 12-2 12-3 12-3 12-4 12-4 12-4 12-4 12-4 12-5 12-5 12-5 12-6 12-6 12-6 12-6 12-6 12-7 12-7 12-7 12-8 12-8 12-8 Oracle Database Features... Oracle Database Concepts Oracle Database Architecture only when the infrastructure is configured as a grid, so it can scale beyond the boundary of a single computer Grid Computing in Oracle Database 10g On the path toward this grand vision of grid computing, companies need real solutions to support their incremental moves toward a more flexible and more productive IT architecture The Oracle Database. .. server Introduction to the Oracle Database 1-7 Oracle Database Architecture ■ Perform the requested operation on behalf of the client If proxy authentication is being used, then the identity of the client is maintained throughout all tiers of the connection Overview of Physical Database Structures The following sections explain the physical database structures of an Oracle database, including datafiles,... files, and control files Datafiles Every Oracle database has one or more physical datafiles The datafiles contain all the database data The data of logical database structures, such as tables and indexes, is physically stored in the datafiles allocated for a database The characteristics of datafiles are: ■ ■ ■ A datafile can be associated with only one database Datafiles can have certain characteristics... extend when the database runs out of space One or more datafiles form a logical unit of database storage called a tablespace Data in a datafile is read, as needed, during normal database operation and stored in the memory cache of Oracle For example, assume that a user wants to access some data in a table of a database If the requested information is not already in the memory cache for the database, then... stamp of database creation Oracle can multiplex the control file, that is, simultaneously maintain a number of identical control file copies, to protect against a failure involving the control file Every time an instance of an Oracle database is started, its control file identifies the database and redo log files that must be opened for database operation to proceed If the physical makeup of the database . Oracle® Database Concepts 10g Release 2 (10.2) B14220-02 October 2005 Oracle Database Concepts, 10g Release 2 (10.2) B14220-02 Copyright. Transaction 12-6 Open a Database in Read-Only Mode 12-6 Overview of Database and Instance Shutdown 12-7 Close a Database 12-7 Close the Database by Terminating the Instance 12-7 Unmount a Database 12-8 Shut. 1-15 Overview of Accessing the Database 1-16 Network Connections 1-16 Starting Up the Database 1-16 How Oracle Works 1-17 Overview of Oracle Utilities 1-17 Oracle Database Features 1-17 Overview

Ngày đăng: 30/03/2014, 22:20

Mục lục

  • Contents

  • Preface

    • Audience

    • Documentation Accessibility

    • Related Documentation

    • Conventions

    • Part I What Is Oracle?

      • 1 Introduction to the Oracle Database

        • Oracle Database Architecture

          • Overview of Oracle Grid Architecture

            • Grid Computing Defined

            • Grid Computing in Oracle Database 10g

            • Overview of Application Architecture

              • Client/Server Architecture

              • Multitier Architecture: Application Servers

              • Overview of Physical Database Structures

                • Datafiles

                • Control Files

                • Redo Log Files

                • Archive Log Files

                • Parameter Files

                • Alert and Trace Log Files

                • Backup Files

                • Overview of Logical Database Structures

                  • Tablespaces

                  • Oracle Data Blocks

                  • Extents

                  • Segments

Tài liệu cùng người dùng

Tài liệu liên quan