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

Tài liệu Oracle8 Concepts docx

804 204 0

Đ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 804
Dung lượng 3,77 MB

Nội dung

Oracle8Concepts Release 8.0 December, 1997 Part No. A58227-01 Oracle8 Concepts Part No. A58227-01 Release 8.0 Copyright © 1997 Oracle Corporation. All rights reserved. Primary Author: Lefty Leverenz Contributors: Richard Allen, David Anderson, Andre Bakker, Steve Bobrowski, Bill Bridge, Atif Chaudry, Cynthia Chin-Lee, Cindy Closkey, Jeff Cohen, Benoit Dageville, Sandy Dreskin, Jason Durbin, Ahmed Ezzat, Diana Foch-Lorentz, John Frazzini, Anurag Gupta, Gary Hallmark, Michael Hartstein, Terry Hayes, Alex Ho, Chin Hong, Ken Jacobs, Sandeep Jain, Amit Jasuja, Hakan Jakobsson, Robert Jenkins, Jr., Ashok Joshi, Jonathan Klein, R. Kleinro, Robert Kooi, Vishu Krishnamurthy, Andre Kruglikov, Tirthankar Lahiri, Juan Loaiza, Brom Mahbod, Richard Mateosian, William Maimone, Andrew Mendel- sohn, Reza Monajjemi, Mark Moore, Rita Moran, Denise Oertel, Mark Porter, Maria Pratt, Tuomas Pystynen, Patrick Ritto, Hasan Rizvi, Sriram Samu, Hari Sankar, Gordon Smith, Danny Sokolsky, Leng Leng Tan, Lynne Thieme, Alvin To, Alex Tsukerman, William Waddington, Joyo Wijaya, Linda Willis, Andrew Witkowski, Mohamed Zait Graphic Designer: Valarie Moore The programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inher- ently dangerous applications. It shall be licensee's responsibility to take all appropriate fail-safe, back up, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and Oracle disclaims liability for any damages caused by such use of the Pro- grams. This Program contains proprietary information of Oracle Corporation; it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright patent and other intellectual property law. Reverse engineering of the software 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. Oracle Corporation does not warrant that this document is error free. If this Program is delivered to a U.S. Government Agency of the Department of Defense, then it is deliv- ered with Restricted Rights and the following legend is applicable: Restricted Rights Legend Programs delivered subject to the DOD FAR Supplement are 'commercial computer software' and use, duplication and disclosure of the Programs shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are 'restricted computer software' and use, duplication and disclo- sure of the Programs shall be subject to the restrictions in FAR 52 227-14, Rights in Data -- General, including Alternate III (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. Oracle SQL*Loader, SQL*Net and SQL*Plus are registered trademarks of Oracle Corporation, Redwood City, California. Net8, Oracle Call Interface, Oracle7, Oracle8, Oracle Forms, Oracle Enterprise Manager, Oracle Parallel Server, Oracle Server Manager, PL/SQL, Pro*C, Pro*C/C++, and Trusted Oracle are trademarks of Oracle Corporation, Redwood City, California. All other products or company names are used for identification purposes only, and may be trademarks of their respective owners. iii Contents Send Us Your Comments . xxiii Preface . xxv Part I What Is Oracle? 1 Introduction to the Oracle Server Databases and Information Management 1-2 The Oracle Server . 1-4 Oracle Databases . 1-8 Database Structure and Space Management . 1-8 Logical Database Structures 1-8 Physical Database Structures 1-11 Memory Structure and Processes . 1-13 Memory Structures . 1-13 Process Architecture . 1-16 The Program Interface . 1-19 An Example of How Oracle Works 1-19 Data Concurrency and Consistency 1-20 Concurrency 1-20 Read Consistency 1-21 Locking Mechanisms 1-22 Distributed Processing and Distributed Databases . 1-23 Client/Server Architecture: Distributed Processing . 1-23 iv Distributed Databases 1-24 Table Replication 1-26 Oracle and Net8 1-26 Startup and Shutdown Operations 1-27 Database Security 1-27 Security Mechanisms 1-28 Trusted Oracle . 1-34 Database Backup and Recovery . 1-34 Why Is Recovery Important? 1-34 Types of Failures . 1-35 Structures Used for Recovery . 1-37 Basic Recovery Steps 1-39 The Recovery Manager 1-40 The Object-Relational Model for Database Management 1-40 The Relational Model . 1-41 The Object-Relational Model . 1-41 Schemas and Schema Objects 1-42 The Data Dictionary . 1-47 Data Access . 1-48 SQL — The Structured Query Language 1-48 Transactions . 1-49 PL/SQL 1-52 Data Integrity . 1-54 Part II Database Structures 2 Data Blocks, Extents, and Segments The Relationships Among Data Blocks, Extents, and Segments . 2-2 Data Blocks . 2-3 Data Block Format 2-3 An Introduction to PCTFREE, PCTUSED, and Row Chaining 2-5 Extents . 2-10 When Extents Are Allocated . 2-11 Determining the Number and Size of Extents 2-11 v How Extents Are Allocated . 2-11 When Extents Are Deallocated . 2-13 Segments . 2-15 Data Segments . 2-15 Index Segments . 2-15 Temporary Segments . 2-16 Rollback Segments 2-17 3 Tablespaces and Datafiles An Introduction to Tablespaces and Datafiles 3-2 Tablespaces . 3-3 The SYSTEM Tablespace . 3-4 Allocating More Space for a Database . 3-4 Bringing Tablespaces Online and Offline . 3-7 Read-Only Tablespaces 3-9 Temporary Tablespaces . 3-10 Datafiles 3-11 Datafile Contents 3-12 Size of Datafiles . 3-12 Offline Datafiles 3-12 4 The Data Dictionary An Introduction to the Data Dictionary . 4-2 The Structure of the Data Dictionary 4-2 SYS, the Owner of the Data Dictionary 4-3 How the Data Dictionary Is Used 4-3 How Oracle Uses the Data Dictionary 4-3 How Oracle Users Can Use the Data Dictionary . 4-5 The Dynamic Performance Tables . 4-7 vi Part III The Oracle Instance 5 Database and Instance Startup and Shutdown Overview of an Oracle Instance . 5-2 The Instance and the Database . 5-2 Connecting with Administrator Privileges . 5-3 Parameter Files 5-4 Instance and Database Startup . 5-5 Starting an Instance 5-5 Mounting a Database . 5-6 Opening a Database 5-7 Database and Instance Shutdown . 5-8 Closing a Database . 5-8 Dismounting a Database 5-8 Shutting Down an Instance . 5-9 6 Memory Structures Introduction to Oracle Memory Structures 6-2 System Global Area (SGA) . 6-2 The Database Buffer Cache 6-3 The Redo Log Buffer . 6-6 The Shared Pool 6-6 Size of the SGA 6-11 Controlling the SGA’s Use of Memory 6-12 Program Global Areas (PGA) . 6-13 Contents of a PGA 6-13 Size of a PGA . 6-14 Sort Areas 6-15 Sort Direct Writes 6-16 Virtual Memory . 6-16 Software Code Areas 6-16 vii 7 Process Structure Introduction to Processes 7-2 Single-Process Oracle . 7-2 Multiple-Process Oracle 7-3 User Processes . 7-4 Oracle Processes 7-5 Trace Files and the ALERT File 7-14 Variations in Oracle Configuration . 7-16 Single-Task Configuration 7-16 Dedicated Server (Two-Task) Configuration . 7-18 The Multithreaded Server . 7-20 Examples of How Oracle Works 7-24 An Example of Oracle Using Dedicated Server Processes . 7-25 An Example of Oracle Using the Multithreaded Server . 7-26 The Program Interface . 7-27 Program Interface Structure 7-27 The Program Interface Drivers . 7-27 Operating System Communications Software . 7-28 Part IV The Object-Relational DBMS 8 Schema Objects Overview of Schema Objects . 8-2 Tables . 8-3 How Table Data Is Stored 8-4 Nulls . 8-7 Default Values for Columns 8-8 Nested Tables 8-9 Views . 8-10 Storage for Views 8-11 How Views Are Used 8-11 The Mechanics of Views 8-12 Dependencies and Views 8-13 viii Updatable Join Views . 8-13 Object Views 8-14 The Sequence Generator . 8-14 Synonyms . 8-15 Indexes 8-17 Unique and Non-Unique Indexes 8-17 Composite Indexes . 8-18 Indexes and Keys 8-19 How Indexes Are Stored 8-19 Reverse Key Indexes . 8-22 Bitmap Indexes 8-23 Index-Organized Tables . 8-28 Benefits of Index-Organized Tables . 8-29 Index-Organized Tables with Row Overflow Area . 8-29 Applications of Interest for Index-Organized Tables 8-30 Clusters . 8-32 Performance Considerations . 8-34 Format of Clustered Data Blocks 8-34 The Cluster Key . 8-35 The Cluster Index 8-35 Hash Clusters . 8-36 How Data Is Stored in a Hash Cluster . 8-37 Hash Key Values . 8-39 Hash Functions 8-40 Allocation of Space for a Hash Cluster 8-41 9 Partitioned Tables and Indexes Introduction to Partitioning 9-2 What Is Partitioning? 9-2 Advantages of Partitioning . 9-4 Very Large Databases (VLDBs) 9-4 Reducing Downtime for Scheduled Maintenance . 9-6 Reducing Downtime Due to Data Failures . 9-7 DSS Performance 9-7 I/O Performance . 9-8 ix Disk Striping: Performance versus Availability . 9-8 Partition Transparency 9-9 Manual Partitioning with Partition Views 9-10 Basic Partitioning Model . 9-11 Range Partitioning 9-12 Partition Names 9-14 Partition Bounds and Partitioning Keys . 9-14 Equipartitioning 9-18 Rules for Partitioning Tables and Indexes . 9-21 Table Partitioning . 9-21 Index Partitioning . 9-22 DML Partition Locks 9-30 Performance Considerations for Oracle Parallel Server . 9-31 Maintenance Operations . 9-31 Partition Maintenance Operations . 9-32 Managing Indexes 9-38 Privileges for Partitioned Tables and Indexes 9-41 Auditing for Partitioned Tables and Indexes . 9-42 SQL Extension: Partition-Extended Table Name 9-42 Examples of Partition-Extended Table Names . 9-43 10 Built-In Datatypes Oracle Datatypes . 10-2 Character Datatypes . 10-2 NUMBER Datatype 10-5 DATE Datatype . 10-7 LOB Datatypes 10-9 RAW and LONG RAW Datatypes . 10-11 ROWID Datatype 10-12 MLSLABEL Datatype . 10-16 Summary of Oracle Datatype Information . 10-17 ANSI, DB2, and SQL/DS Datatypes . 10-19 Data Conversion 10-20 x 11 User-Defined Datatypes (Objects Option) Introduction . 11-2 Complex Data Models 11-2 Multimedia Datatypes . 11-3 User-Defined Datatypes . 11-3 Object Types 11-4 Collection Types 11-9 Application Interfaces 11-11 SQL 11-12 PL/SQL 11-12 Pro*C/C++ . 11-12 OCI 11-13 OTT . 11-14 12 Using User-Defined Datatypes References and Name Resolution 12-2 Table Aliases 12-2 Method Calls without Arguments . 12-3 Storage of User-Defined Types . 12-4 Leaf-Level Attributes 12-4 Row Objects . 12-4 Column Objects . 12-5 REFs 12-5 Nested Tables 12-5 VARRAYs 12-5 Properties of Object Attributes 12-6 Nulls 12-6 Defaults 12-7 Constraints . 12-8 Indexes 12-9 Triggers 12-9 Privileges on User-Defined Types and Their Methods . 12-10 System Privileges 12-10 Schema Object Privileges . 12-10 Using Types in New Types or Tables 12-11 [...]... server manuals Information in this manual applies to the Oracle server running on all operating systems Oracle8 and Oracle8 Enterprise Edition Oracle8 Concepts contains information that describes the features and functionality of the Oracle8 and the Oracle8 Enterprise Edition products Oracle8 and Oracle8 Enterprise Edition have the same basic features However, several advanced features are available... This chapter contains information relating to both Oracle8 and the Oracle8 Enterprise Edition Some of the features and options documented in this chapter are available only if you have purchased the Oracle8 Enterprise Edition See Getting to Know Oracle8 and the Oracle8 Enterprise Edition for information about the differences between Oracle8 and the Oracle8 Enterprise Edition Attention: Introduction... differences between Oracle8 and the Oracle8 Enterprise Edition and the features and options that are available to you, see Getting to Know Oracle8 and the Oracle8 Enterprise Edition xxv Audience This manual is written for database administrators, system administrators, and database application developers What You Should Already Know You should be familiar with relational database concepts and with the... other concepts of the Oracle server, it does not explain how to administer the Oracle server For that information, see Oracle8 Administrator’s Guide If You’re Interested in Application Design In addition to administrators, experienced users of Oracle and advanced database application designers will find information in this manual useful However, database application developers should also refer to Oracle8. .. introduction to the concepts and terminology used throughout the remainder of this manual If You’re Interested in Installation and Migration This manual is not an installation or migration guide Therefore, if your primary interest is installation, refer to your operating system-specific Oracle documentation, or if your primary interest is database and application migration, refer to Oracle8 Migration... Basic Replication Advanced (Symmetric) Replication Basic Replication Concepts Uses of Basic Replication Read-Only Table Snapshots Snapshot Refreshes Other Basic Replication Options Advanced Replication Concepts Uses for Advanced Replication Advanced Replication Configurations ... Oracle Parkway Redwood Shores, CA 94065 Fax: (650) 506-7200 xxxii Part I What Is Oracle? Part I provides an overview of Oracle server concepts and terminology It contains one chapter: s Chapter 1, “Introduction to the Oracle Server” The rest of this manual describes the concepts that are summarized in Chapter 1 more thoroughly 1 Introduction to the Oracle Server I am Sir Oracle, And when I ope my lips,... 31-19 31-22 xxi Replication Conflicts 31-22 Unique Advanced Replication Options 31-26 Part IX A Operating System-Specific Information Index xxii Appendix Send Us Your Comments Oracle8 Concepts, Release 8.0 Part No A58227-01 Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this publication Your input is an important part of the information... process- Oracle maintains the preceding features with a ing performance high degree of overall system performance Database users do not suffer from slow processing performance high availability 1-2 Oracle8 Concepts At some sites, Oracle works 24 hours per day with no down time to limit database throughput Normal system operations such as database backup and partial computer system failures do not interrupt... all of the operating system-specific references within this manual xxx How to Use This Manual Every reader of this manual should read Chapter 1, “Introduction to the Oracle Server” This overview of the concepts and terminology related to Oracle provides a foundation for the more detailed information that follows in later chapters Each part of this manual addresses a specific audience within the general . Oracle8  Concepts Release 8.0 December, 1997 Part No. A58227-01 Oracle8 Concepts Part No. A58227-01 Release 8.0. Corporation, Redwood City, California. Net8, Oracle Call Interface, Oracle7, Oracle8, Oracle Forms, Oracle Enterprise Manager, Oracle Parallel Server, Oracle

Ngày đăng: 21/12/2013, 06:17

w