Oracle Database Database Concepts

Transcription

Oracle DatabaseDatabase Concepts21cF31733-04August 2021

Oracle Database Database Concepts, 21cF31733-04Copyright 1993, 2021, Oracle and/or its affiliates.Primary Authors: Lance Ashdown, Donna Keesling, Tom KyteContributors: Drew Adams, Ashish Agrawal, Troy Anthony, Vikas Arora, Jagan Athraya, David Austin,Thomas Baby, Vladimir Barriere, Hermann Baer, Srinagesh Battula, Nigel Bayliss, Tammy Bednar, VirginiaBeecher, Bjorn Bolltoft, Ashmita Bose, David Brower, Larry Carpenter, Lakshminaray Chidambaran, DebaChatterjee, Shasank Chavan, Tim Chien, Gregg Christman, Bernard Clouse, Maria Colgan, Carol Colrain,Nelson Corcoran, Michael Coulter, Jonathan Creighton, Judith D'Addieco, Mark Dilman, Kurt Engeleiter,Bjørn Engsig, Marcus Fallon, Steve Fogel, Jonathan Giloni, Naveen Gopal, Bill Habeck , Min-Hank Ho, LijieHeng, Bill Hodak, Yong Hu, Pat Huey, Praveen Kumar Tupati Jaganath, Sanket Jain, Prakash Jashnani,Caroline Johnston, Shantanu Joshi, Jesse Kamp, Vikram Kapoor, Feroz Khan, Jonathan Klein, AndreKruglikov, Sachin Kulkarni, Surinder Kumar, Paul Lane, Adam Lee, Allison Lee, Jaebock Lee, Sue Lee, TeckHua Lee, Yunrui Li , Ilya Listvinski, Bryn Llewellyn, Rich Long, Barb Lundhild, Neil Macnaughton, VineetMarwah, Susan Mavris, Bob McGuirk, Joseph Meeks, Mughees Minhas, Sheila Moore, Valarie Moore, GopalMulagund, Charles Murray, Kevin Neel, Sue Pelski, Raymond Pfau, Gregory Pongracz, Vivek Raja, AshishRay, Bert Rich, Kathy Rich, Andy Rivenes, Scott Rotondo, Vivian Schupmann, Venkat Senaptai, ShrikanthShankar, Prashanth Shanthaveerappa, Cathy Shea, Susan Shepard, Kam Shergill, Mike Skarpelos, SachinSonawane, James Spiller, Suresh Sridharan, Jim Stenoish, Janet Stern, Rich Strohm, Roy Swonger, KamalTbeileh, Juan Tellez, Ravi Thammaiah, Lawrence To, Tomohiro Ueda, Randy Urbano, Badhri Varanasi, NickWagner, Steve Wertheimer, Patrick Wheeler, Doug Williams, James Williams, Andrew Witkowski, DanielWong, Hailing YuThis software and related documentation are provided under a license agreement containing restrictions onuse and disclosure and are protected by intellectual property laws. Except as expressly permitted in yourlicense 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. Reverseengineering, disassembly, or decompilation of this software, unless required by law for interoperability, isprohibited.The information contained herein is subject to change without notice and is not warranted to be error-free. Ifyou find any errors, please report them to us in writing.If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it onbehalf of the U.S. Government, then the following notice is applicable:U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software,any programs embedded, installed or activated on delivered hardware, and modifications of such programs)and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government endusers are "commercial computer software" or "commercial computer software documentation" pursuant to theapplicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use,reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/oradaptation of i) Oracle programs (including any operating system, integrated software, any programsembedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oraclecomputer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in thelicense contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloudservices are defined by the applicable contract for such services. No other rights are granted to the U.S.Government.This software or hardware 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 thatmay create a risk of personal injury. If you use this software or hardware in dangerous applications, then youshall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure itssafe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of thissoftware or hardware in dangerous applications.Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks oftheir respective owners.Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks areused under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc,and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registeredtrademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products,and services from third parties. Oracle Corporation and its affiliates are not responsible for and expresslydisclaim all warranties of any kind with respect to third-party content, products, and services unless otherwiseset forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not beresponsible for any loss, costs, or damages incurred due to your access to or use of third-party content,products, or services, except as set forth in an applicable agreement between you and Oracle.

ContentsPreface1AudiencexxDocumentation AccessibilityxxRelated DocumentationxxiConventionsxxiIntroduction to Oracle DatabaseAbout Relational Databases1-1Database Management System (DBMS)1-1Relational Model1-2Relational Database Management System (RDBMS)1-2Brief History of Oracle Database1-3Schema Objects1-4Tables1-5Indexes1-5Data Access1-6Structured Query Language (SQL)1-6PL/SQL and Java1-6Transaction Management1-7Transactions1-7Data Concurrency1-8Data Consistency1-8Oracle Database ArchitectureDatabase and InstanceMultitenant Architecture1-91-91-9Sharding Architecture1-12Database Storage Structures1-14Physical Storage Structures1-14Logical Storage Structures1-15Database Instance Structures1-15Oracle Database Processes1-15Instance Memory Structures1-16iii

Application and Networking Architecture1-16Application Architecture1-17Oracle Net Services Architecture1-17Oracle Database Documentation RoadmapPart I231-18Oracle Database Documentation: Basic Group1-18Oracle Database Documentation: Intermediate Group1-19Oracle Database Documentation: Advanced Group1-19Multitenant ArchitectureCDBs and PDBsAbout Containers in a CDB2-1The CDB Root and System Container2-4PDBs2-5Types of PDBs2-5Purpose of PDBs2-6Proxy PDBs2-7Names for PDBs2-8Database Links Between PDBs2-9Application ContainersAbout Application Containers3-1Purpose of Application Containers3-2Key Benefits of Application Containers3-2Application Container Use Case: SaaS3-2Application Containers Use Case: Logical Data Warehouse3-3Application Root3-4Application PDBs3-5Application Seed3-5Application Common Objects3-5About Commonality in a CDB3-6Principles of Commonality3-6Namespaces in a CDB3-6Creation of Application Common Objects3-7Metadata-Linked Application Common Objects3-8Metadata Links3-10Data-Linked Application Common Objects3-10Extended Data-Linked Application Objects3-11Container Maps3-12iv

Cross-Container OperationsPart II43-15Oracle Relational Data StructuresTables and Table ClustersIntroduction to Schema ObjectsAbout Common and Local User Accounts4-14-1Common User Accounts4-3Local User Accounts4-7Common and Local Objects4-9Schema Object Types4-9Schema Object Storage4-10Schema Object Dependencies4-11Sample Schemas4-13Overview of TablesColumns4-144-15Virtual Columns4-15Invisible Columns4-16Rows4-16Example: CREATE TABLE and ALTER TABLE Statements4-16Oracle Data Types4-18Character Data Types4-19Numeric Data Types4-21Datetime Data Types4-22Rowid Data Types4-23Format Models and Data Types4-24Integrity Constraints4-25Table Storage4-26Table Organization4-26Row Storage4-27Rowids of Row Pieces4-27Storage of Null Values4-28Table Compression4-28Basic Table Compression and Advanced Row Compression4-28Hybrid Columnar Compression4-29Overview of Table Clusters4-33Overview of Indexed Clusters4-34Overview of Hash Clusters4-36Hash Cluster Creation4-36Hash Cluster Queries4-37v

Hash Cluster Variations4-38Hash Cluster Storage4-39Overview of Attribute-Clustered Tables4-40Advantages of Attribute-Clustered Tables4-41Join Attribute Clustered Tables4-42I/O Reduction Using Zones4-42Purpose of Zones4-42Zone Maps4-43Zone Map Creation4-43How a Zone Map Works: Example4-44Attribute-Clustered Tables with Linear Ordering4-45Attribute-Clustered Tables with Interleaved Ordering4-46Overview of Temporary Tables4-48Purpose of Temporary Tables4-49Segment Allocation in Temporary Tables4-49Temporary Table Creation4-49Overview of External Tables54-50Purpose of External Tables4-50Data in Object Stores4-51External Table Access Drivers4-51External Table Creation4-52Overview of Blockchain Tables4-53Row Chains4-53Row Content4-53User Interface for Blockchain Tables4-54Overview of Immutable Tables4-55Overview of Object Tables4-55Indexes and Index-Organized TablesIntroduction to Indexes5-1Advantages and Disadvantages of Indexes5-2Index Usability and Visibility5-3Keys and Columns5-3Composite Indexes5-4Unique and Nonunique Indexes5-5Types of Indexes5-6How the Database Maintains Indexes5-7Index Storage5-7Overview of B-Tree Indexes5-8Branch Blocks and Leaf Blocks5-9vi

Index ScansFull Index Scan5-10Fast Full Index Scan5-11Index Range Scan5-12Index Unique Scan5-12Index Skip Scan5-13Index Clustering Factor5-14Reverse Key Indexes5-16Ascending and Descending Indexes5-17Index Compression5-17Prefix Compression5-18Advanced Index Compression5-19Overview of Bitmap Indexes65-105-21Example: Bitmap Indexes on a Single Table5-22Bitmap Join Indexes5-23Bitmap Storage Structure5-25Overview of Function-Based Indexes5-26Uses of Function-Based Indexes5-27Optimization with Function-Based Indexes5-28Overview of Application Domain Indexes5-28Overview of Index-Organized Tables5-29Index-Organized Table Characteristics5-30Index-Organized Tables with Row Overflow Area5-32Secondary Indexes on Index-Organized Tables5-33Logical Rowids and Physical Guesses5-34Bitmap Indexes on Index-Organized Tables5-34Partitions, Views, and Other Schema ObjectsOverview of PartitionsPartition Characteristics6-16-2Partition Key6-2Partitioning Strategies6-2Partitioned Tables6-9Segments for Partitioned Tables6-10Compression for Partitioned Tables6-10Partitioned Indexes6-10Local Partitioned Indexes6-11Global Partitioned Indexes6-13Partial Indexes for Partitioned TablesOverview of Sharded Tables6-166-17vii

Sharded Tables6-19Overview of Views6-20Characteristics of Views6-21Data Manipulation in Views6-22How Data Is Accessed in Views6-22Updatable Join Views6-23Object Views6-24Overview of Materialized Views6-25Characteristics of Materialized Views6-26Refresh Methods for Materialized Views6-27Complete Refresh6-27Incremental Refresh6-28In-Place and Out-of-Place Refresh6-28Automatic Materialized Views6-29Query Rewrite6-29Overview of Sequences6-30Sequence Characteristics6-30Concurrent Access to Sequences6-31Overview of Dimensions6-32Hierarchical Structure of a Dimension6-32Creation of Dimensions6-33Overview of Synonyms76-34Data IntegrityIntroduction to Data Integrity7-1Techniques for Guaranteeing Data Integrity7-1Advantages of Integrity Constraints7-2Types of Integrity Constraints7-2NOT NULL Integrity Constraints7-3Unique Constraints7-4Primary Key Constraints7-6Foreign Key Constraints7-7Self-Referential Integrity Constraints7-9Nulls and Foreign Keys7-10Parent Key Modifications and Foreign Keys7-10Indexes and Foreign Keys7-11Check Constraints7-12States of Integrity Constraints7-13Checks for Modified and Existing Data7-13When the Database Checks Constraints for Validity7-14viii

Nondeferrable Constraints7-14Deferrable Constraints7-15Examples of Constraint Checking8Example: Insertion of a Value in a Foreign Key Column When No Parent Key ValueExists7-16Example: Update of All Foreign Key and Parent Key Values7-16Data Dictionary and Dynamic Performance ViewsOverview of the Data DictionaryPurpose of the Data Dictionary8-18-1Data Dictionary Separation in a CDB8-28-3Container Data Objects in a CDB8-5Views with the Prefix DBA8-7Views with the Prefix ALL8-7Views with the Prefix USER8-8The DUAL Table8-8How the Data Dictionary WorksMetadata and Data Links8-98-9Public Synonyms for Data Dictionary Views8-11Data Dictionary Cache8-11Other Programs and the Data Dictionary8-11Data Dictionary StorageOverview of the Dynamic Performance Views8-118-12Contents of the Dynamic Performance Views8-12Storage of the Dynamic Performance Views8-13Database Object MetadataPart III8-1Data ManagementData Dictionary Components97-158-13Oracle Data AccessSQLIntroduction to SQL9-1SQL Data Access9-2SQL Standards9-2Overview of SQL Statements9-3Data Definition Language (DDL) Statements9-3Data Manipulation Language (DML) Statements9-5SELECT Statements9-6ix

Joins9-7Subqueries9-8Transaction Control Statements9-9Session Control Statements9-10System Control Statement9-11Embedded SQL Statements9-11Overview of the Optimizer9-12Use of the Optimizer9-12Optimizer Components9-13Query Transformer9-15Estimator9-15Plan Generator9-15Access Paths9-16Optimizer Statistics9-17Optimizer Hints9-18Overview of SQL Processing9-19Stages of SQL Processing9-19SQL Parsing9-20SQL Optimization9-21SQL Row Source Generation9-21SQL Execution9-21Differences Between DML and DDL Processing109-22Server-Side Programming: PL/SQL and JavaIntroduction to Server-Side Programming10-1Overview of PL/SQL10-2PL/SQL Subprograms10-3Advantages of PL/SQL Subprograms10-3Creation of PL/SQL Subprograms10-5Execution of PL/SQL Subprograms10-5PL/SQL Packages10-7Advantages of PL/SQL Packages10-7Creation of PL/SQL Packages10-8Execution of PL/SQL Package Subprograms10-8PL/SQL Anonymous Blocks10-9PL/SQL Language Constructs10-10PL/SQL Collections and Records10-11Collections10-11Records10-11How PL/SQL Runs10-12x

Overview of Java in Oracle DatabaseOverview of the Java Virtual Machine (JVM)1110-15Overview of Oracle JVM10-15Main Components of Oracle JVM10-16Java Programming Environment10-17Java Stored Procedures10-18Java and PL/SQL Integration10-18Overview of TriggersPart IV10-1310-20Advantages of Triggers10-20Types of Triggers10-21Timing for Triggers10-22Creation of Triggers10-22Example: CREATE TRIGGER Statement10-23Example: Invoking a Row-Level Trigger10-24Execution of Triggers10-26Storage of Triggers10-27Oracle Transaction ManagementData Concurrency and ConsistencyIntroduction to Data Concurrency and ConsistencyMultiversion Read Consistency11-111-2Statement-Level Read Consistency11-2Transaction-Level Read Consistency11-3Read Consistency and Undo Segments11-3Read Consistency and Deferred Inserts11-5Locking Mechanisms11-6ANSI/ISO Transaction Isolation Levels11-6Overview of Oracle Database Transaction Isolation LevelsRead Committed Isolation Level11-711-8Read Consistency in the Read Committed Isolation Level11-8Conflicting Writes in Read Committed Transactions11-8Serializable Isolation Level11-11Read-Only Isolation Level11-15Overview of the Oracle Database Locking Mechanism11-16Summary of Locking Behavior11-16Use of Locks11-17Lock Modes11-20Lock Conversion and Escalation11-21Lock Duration11-21xi

Locks and Deadlocks11-22Overview of Automatic Locks11-23DML Locks11-24Row Locks (TX)11-24Table Locks (TM)11-28Locks and Foreign Keys11-29DDL Locks11-32Exclusive DDL Locks11-32Share DDL Locks11-32Breakable Parse Locks11-33System Locks1211-33Latches11-33Mutexes11-34Internal Locks11-34Overview of Manual Data Locks11-35Overview of User-Defined Locks11-36TransactionsIntroduction to Transactions12-1Sample Transaction: Account Debit and Credit12-2Structure of a Transaction12-2Beginning of a Transaction12-3End of a Transaction12-3Statement-Level Atomicity12-5System Change Numbers (SCNs)12-6Overview of Transaction Control12-6Transaction Names12-8Active Transactions12-9Savepoints12-9Rollback to Savepoint12-10Enqueued Transactions12-10Rollback of Transactions12-12Commits of Transactions12-12Overview of Transaction Guard12-14Benefits of Transaction Guard12-14How Transaction Guard Works12-15Lost Commit Messages12-15Logical Transaction ID12-16Transaction Guard: Example12-17Overview of Application Continuity12-17xii

Benefits of Application ContinuityUse Case for Application Continuity12-18Application Continuity for Planned Maintenance12-18Application Continuity Architecture12-19Overview of Autonomous Transactions12-20Overview of Distributed Transactions12-21Part V1312-18Two-Phase Commit12-22In-Doubt Transactions12-22Oracle Database Storage StructuresPhysical Storage StructuresIntroduction to Physical Storage Structures13-1Mechanisms for Storing Database Files13-2Oracle Managed Files and User-Managed Files13-3Oracle Automatic Storage Management (Oracle ASM)13-4Oracle ASM Storage Components13-4Oracle ASM Instances13-6Oracle Persistent Memory Filestore (PMEM Filestore)13-7Directly Mapped Buffer Cache13-8File System Interface for PMEM Filestore13-8User Interface for PMEM Filestore13-9Overview of Data FilesUse of Data Files13-913-9Permanent and Temporary Data Files13-11Online and Offline Data Files13-11Data File Structure13-12Overview of Control Files13-13Use of Control Files13-13Multiple Control Files13-14Control File Structure13-15Overview of the Online Redo Log13-15Use of the Online Redo Log13-16How Oracle Database Writes to the Online Redo Log13-16Online Redo Log Switches13-17Multiple Copies of Online Redo Log Files13-18Archived Redo Log Files13-19Structure of the Online Redo Log13-20xiii

14Logical Storage StructuresIntroduction to Logical Storage Structures14-1Logical Storage Hierarchy14-2Logical Space Management14-3Locally Managed Tablespaces14-4Dictionary-Managed Tablespaces14-7Overview of Data Blocks14-7Data Blocks and Operating System Blocks14-7Database Block Size14-8Tablespace Block Size14-8Data Block Format14-9Data Block Overhead14-9Row Format14-10Data Block Compression14-13Space Management in Data Blocks14-14Percentage of Free Space in Data Blocks14-15Optimization of Free Space in Data Blocks14-16Chained and Migrated Rows14-18Overview of Index Blocks14-20Types of Index Blocks14-20Storage of Index Entries14-20Reuse of Slots in an Index Block14-21Coalescing an Index Block14-21Overview of Extents14-23Allocation of Extents14-23Deallocation of Extents14-25Storage Parameters for Extents14-26Overview of Segments14-27User Segments14-27User Segment Creation14-28Temporary Segments14-29Allocation of Temporary Segments for Queries14-30Allocation of Segments for Temporary Tables and Indexes14-30Undo Segments14-31Undo Segments and Transactions14-32Transaction Rollback14-34Temporary Undo Segments14-34Segment Space and the High Water Mark14-35Overview of Tablespaces14-38Tablespaces in a Multitenant Environment14-38xiv

Permanent TablespacesThe SYSTEM Tablespace14-41The SYSAUX Tablespace14-42Undo Tablespaces14-42Shadow Tablespaces14-44Temporary Tablespaces14-47Default Temporary Tablespaces14-4814-50Read/Write and Read-Only Tablespaces14-50Online and Offline Tablespaces14-51Tablespace File Size1514-47Shared and Local Temporary TablespacesTablespace ModesPart VI14-4014-52Oracle Instance ArchitectureOracle Database InstanceIntroduction to the Oracle Database Instance15-1Database Instance Structure15-1Database Instance Configurations15-2Read/Write and Read-Only Instances15-4Duration of a Database Instance15-4Identification of a Database Instance15-6Oracle Base Directory15-6Oracle Home Directory15-6Oracle System Identifier (SID)15-7Overview of Database Instance Startup and ShutdownOverview of Instance and Database StartupConnection with Administrator Privileges15-815-815-9How an Instance Is Started15-10How a Database Is Mounted15-10How a Database Is Opened15-11Overview of Database and Instance Shutdown15-12Shutdown Modes15-13How a Database Is Closed15-15How a Database Is Unmounted15-15How an Instance Is Shut Down15-15Overview of Checkpoints15-16Purpose of Checkpoints15-16When Oracle Database Initiates Checkpoints15-17Overview of Instance Recovery15-17xv

Purpose of Instance Recovery15-18When Oracle Database Performs Instance Recovery15-18Importance of Checkpoints for Instance Recovery15-19Instance Recovery Phases15-20Overview of Parameter Files15-21Initialization Parameters15-21Functional Groups of Initialization Parameters15-21Basic and Advanced Initialization Parameters15-21Server Parameter Files15-22Text Initialization Parameter Files15-22Modification of Initialization Parameter Values15-24Overview of Diagnostic Files15-25Automatic Diagnostic Repository15-25Problems and Incidents15-26ADR Structure15-26Alert Log15-28Attention Log15-28DDL Log15-29Trace Files15-29Types of Trace Files15-29Locations of Trace Files15-30Segmentation of Trace Files15-30Diagnostic Dumps15-31Trace Dumps and Incidents1615-31Memory ArchitectureIntroduction to Oracle Database Memory Structures16-1Basic Memory Structures16-1Oracle Database Memory Management16-3Overview of the User Global Area16-4Overview of the Program Global Area (PGA)16-5Contents of the PGA16-6Private SQL Area16-6SQL Work Areas16-7PGA Usage in Dedicated and Shared Server Modes16-9Overview of the System Global Area (SGA)16-9Database Buffer Cache16-10Purpose of the Database Buffer Cache16-11Buffer States16-11Buffer Modes16-12xvi

Buffer I/O16-12Buffer Pools16-16Buffers and Full Table Scans16-18DRAM and PMEM Buffers16-20Redo Log Buffer16-21Shared Pool16-22Library Cache16-23Data Dictionary Cache16-26Server Result Cache16-27Reserved Pool16-30Large Pool1716-30Large Pool Memory Management16-31Large Pool Buffers for Deferred Inserts16-31Java Pool16-33Fixed SGA16-33Optional Performance-Related SGA Subareas16-34In-Memory Area16-34Memoptimize Pool16-34Overview of Software Code Areas16-36Process ArchitectureIntroduction to Processes17-1Types of Processes17-1Multiprocess and Multithreaded Oracle Database Systems17-3Overview of Client Processes17-5Client and Server Processes17-5Connections and Sessions17-6Current Container17-6Database Operations17-8Overview of Server Processes17-9Dedicated Server Processes17-9Shared Server Processes17-10How Oracle Database Creates Server Processes17-10Overview of Background ProcessesMandatory Background Processes17-1117-12Process Monitor Process (PMON) Group17-12Process Manager (PMAN)17-14Listener Registration Process (LREG)17-14System Monitor Process (SMON)17-14Database Writer Process (DBW)17-15xvii

Log Writer Process (LGWR)17-15Checkpoint Process (CKPT)17-17Manageability Monitor Processes (MMON and MMNL)17-18Recoverer Process (RECO)17-18Optional Background Processes17-18Archiver Processes (ARCn)17-19Job Queue Processes (CJQ0 and Jnnn)17-19Flashback Data Archive Process (FBDA)17-20Space Management Coordinator Process (SMCO)17-20Slave Processes1817-21I/O Slave Processes17-21Parallel Execution (PX) Server Processes17-22Application and Oracle Net Services ArchitectureOverview of Oracle Application Architecture18-1Overview of Client/Server Architecture18-1Distributed Processing18-1Advantages of a Client/Server Architecture18-3Overview of Multitier Architecture18-3Clients18-4Application Servers18-4Database Servers18-5Service-Oriented Architecture (SOA)18-5Overview of Grid Architecture18-6Overview of Oracle Net Services Architecture18-6How Oracle Net Services Works18-7The Oracle Net Listener18-7Service Names18-9Services in a Multitenant Environment18-10Service Registration18-13Dedicated Server Architecture18-13Shared Server Architecture18-15Dispatcher Request and Response Queues18-16Restricted Operations of the Shared Server18-18Database Resident Connection Pooling18-19Overview of the Program Interface18-20Program Interface Structure18-21Program Interface Drivers18-21Communications Software for the Operating System18-21xviii

GlossaryIndexxix

PrefacePrefaceThis manual provides an architectural and conceptual overview of the Oracle databaseserver, which is an object-relational database management system.The book describes how the Oracle database server functions, and it lays aconceptual foundation for much of the practical information contained in othermanuals. Information in this manual applies to the Oracle database server running onall operating systems.This preface contains these topics: Audience Documentation Accessibility Related Documentation ConventionsAudienceOracle Database Concepts is intended for technical users, primarily databaseadministrators and database application developers, who are new to Oracle Database.Typically, the reader of this manual has had experience managing or developingapplications for other relational databases.To use this manual, you must know the following: Relational database concepts in general Concepts and terminology in Introduction to Oracle Database The operating system environment under which you are running OracleDocumentation AccessibilityFor information about Oracle's commitment to accessibility, visit the OracleAccessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx acc&id docacc.Access to Oracle SupportOracle customers that have purchased support have access to electronic supportthrough My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx acc&id info or visit http://www.oracle.com/pls/topic/lookup?ctx acc&id trsif you are hearing impaired.xx

PrefaceRelated DocumentationFor related documentation, see "Oracle Database Documentation Roadmap".Many publications in the Oracle Database documentation set use the sample schemas of thedatabase that is installed by default when you install Oracle Database. Refer to OracleDatabase Sample Schemas for information on how these schemas were created and howyou can use them.ConventionsThe following text conventions are used in this manual:ConventionMeaningboldfaceBoldface type indicates graphical user interface elements associated with anaction, or terms defined in text or the glossary.italicItalic type indicates manual titles, emphasis, or placeholder variables forwhich you supply particular values.monospaceMonospace type indicates commands within a paragraph, URLs, code inexamples, text that appears on the screen, or text that you enter.xxi

1Introduction to Oracle DatabaseThis chapter provides an overview of Oracle Database.This chapter contains the following topics: About Relational Databases Schema Objects Data Access Transaction Management Oracle Database Architecture Oracle Database Documentation RoadmapAbout Relational DatabasesEvery organization has information that it must store and manage to meet its requirements.For example, a corporation must collect and maintain human resources records for itsemployees. This information must be available to those who need it.An information system is a formal system for storing and processing information. Aninformation system could be a set of cardboard boxes containing manila folders along withrules for how to store and retrieve the folders. However, most companies today use adatabase to automate their information systems. A database is an organized collection ofinformation treated as a unit. The purpose of a database is to collect, store, and retrieverelated information for use by database applications.Database Management System (DBMS)A database management system (DBMS) is software that controls the storage,organization, and retrieval of data.Typically, a DBMS has the following elements: Kernel codeThis code manages memory and storage for the DBMS. Repository of metadataThis repository is usually called a data dictionary. Query languageThis language enables applications to access the data.A database application is a software program that interacts with a database to access andmanipulate data.The first generation of database management systems included the following types: Hierarchical1-1

Chapter 1About Relational DatabasesA hierarchical database organizes data in a tree structure. Each parent record hasone or more child records, similar to the structure of a file system. NetworkA network database is similar to a hierarchical database, except records have amany-to-many rather than a one-to-many relationship.The preceding database management systems stored data in rigid, predeterminedrelationships. Because no data definition language existed, changing the structure ofthe data was difficult. Also, these systems lacked a simple query language, whichhindered application development.Relational ModelIn his seminal 1970 paper "A Relational Model of Data for Large Shared Data Banks,"E. F. Codd defined a relational model based on mathematical set theory. Today, themost widely accepted database model is the relational model.A relational database is a database that conforms to the relational model. Therelational model has the following major aspects: StructuresWell-defined objects store or access the data of a database. OperationsClearly defined actions enable applications to manipulate the data and structuresof a database. Integrity rulesIntegrity rules govern operations on the data and structures of a database.A relational database stores data in a set of simple relations. A relation is a set oftuples. A tuple is an unordered set of attribute values.A table is a two-dimensional representation of a relation in the form of rows (tuples)and columns (attributes). Each row in a table has the same set of columns. A relationaldatabase is a database that stores data in relations (tables). For example, a relationaldatabase could store information about company employees in an employee table, adepartment table, and a salary table.See Al

Application Architecture 1-17 Oracle Net Services Architecture 1-17 Oracle Database Documentation Roadmap 1-18 Oracle Database Documentation: Basic Group 1-18 Oracle Database Documentation: Intermediate Group 1-19 Oracle Database Documentation: Advanced Group 1-19. Part I . Multitenant Architecture. 2 . CDBs and PDBs. About Containers in a CDB 2-1