Go to main content
1/35
Contents
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documentation
Conventions
Changes in This Release for Oracle Database Concepts
Changes in Oracle Database 12
c
Release 2 (12.2.0.1)
New Features
Changes in Oracle Database 12
c
Release 1 (12.1.0.2)
New Features
Changes in Oracle Database 12
c
Release 1 (12.1.0.1)
New Features
Part I Oracle Relational Data Structures
1
Introduction to Oracle Database
About Relational Databases
Database Management System (DBMS)
Relational Model
Relational Database Management System (RDBMS)
Brief History of Oracle Database
Schema Objects
Tables
Indexes
Data Access
Structured Query Language (SQL)
PL/SQL and Java
Transaction Management
Transactions
Data Concurrency
Data Consistency
Oracle Database Architecture
Database and Instance
Database Storage Structures
Physical Storage Structures
Logical Storage Structures
Database Instance Structures
Oracle Database Processes
Instance Memory Structures
Application and Networking Architecture
Application Architecture
Networking Architecture
Multitenant Architecture
Oracle Database Documentation Roadmap
Oracle Database Documentation: Basic Group
Oracle Database Documentation: Intermediate Group
Oracle Database Documentation: Advanced Group
2
Tables and Table Clusters
Introduction to Schema Objects
Schema Object Types
Schema Object Storage
Schema Object Dependencies
SYS and SYSTEM Schemas
Sample Schemas
Overview of Tables
Columns
Virtual Columns
Invisible Columns
Rows
Example: CREATE TABLE and ALTER TABLE Statements
Oracle Data Types
Character Data Types
VARCHAR2 and CHAR Data Types
NCHAR and NVARCHAR2 Data Types
Numeric Data Types
NUMBER Data Type
Floating-Point Numbers
Datetime Data Types
DATE Data Type
TIMESTAMP Data Type
Rowid Data Types
Use of Rowids
ROWID Pseudocolumn
Format Models and Data Types
Integrity Constraints
Table Storage
Table Organization
Row Storage
Rowids of Row Pieces
Storage of Null Values
Table Compression
Basic Table Compression and Advanced Row Compression
Hybrid Columnar Compression
Types of Hybrid Columnar Compression
Compression Units
DML and Hybrid Columnar Compression
Overview of Table Clusters
Overview of Indexed Clusters
Overview of Hash Clusters
Hash Cluster Creation
Hash Cluster Queries
Hash Cluster Variations
Hash Cluster Storage
Overview of Attribute-Clustered Tables
Advantages of Attribute-Clustered Tables
Join Attribute Clustered Tables
I/O Reduction Using Zones
Zone Maps
Zone Maps: Analogy
Zone Maps: Example
Attribute-Clustered Tables with Linear Ordering
Attribute-Clustered Tables with Interleaved Ordering
Overview of Temporary Tables
Purpose of Temporary Tables
Segment Allocation in Temporary Tables
Temporary Table Creation
Overview of External Tables
Purpose of External Tables
External Table Access Drivers
External Table Creation
Overview of Object Tables
3
Indexes and Index-Organized Tables
Introduction to Indexes
Benefits of Indexes
Index Usability and Visibility
Keys and Columns
Composite Indexes
Unique and Nonunique Indexes
Types of Indexes
How the Database Maintains Indexes
Index Storage
Overview of B-Tree Indexes
Branch Blocks and Leaf Blocks
Index Scans
Full Index Scan
Fast Full Index Scan
Index Range Scan
Index Unique Scan
Index Skip Scan
Index Clustering Factor
Reverse Key Indexes
Ascending and Descending Indexes
Index Compression
Prefix Compression
Advanced Index Compression
Overview of Bitmap Indexes
Example: Bitmap Indexes on a Single Table
Bitmap Join Indexes
Bitmap Storage Structure
Overview of Function-Based Indexes
Uses of Function-Based Indexes
Optimization with Function-Based Indexes
Overview of Application Domain Indexes
Overview of Index-Organized Tables
Index-Organized Table Characteristics
Index-Organized Tables with Row Overflow Area
Secondary Indexes on Index-Organized Tables
Logical Rowids and Physical Guesses
Bitmap Indexes on Index-Organized Tables
4
Partitions, Views, and Other Schema Objects
Overview of Partitions
Partition Characteristics
Partition Key
Partitioning Strategies
Range Partitioning
Interval Partitioning
List Partitioning
Hash Partitioning
Reference Partitioning
Composite Partitioning
Partitioned Tables
Partitioned Indexes
Local Partitioned Indexes
Local Prefixed and Nonprefixed Indexes
Local Partitioned Index Storage
Global Partitioned Indexes
Partial Indexes for Partitioned Tables
Partitioned Index-Organized Tables
Overview of Views
Characteristics of Views
Data Manipulation in Views
How Data Is Accessed in Views
Updatable Join Views
Object Views
Overview of Materialized Views
Characteristics of Materialized Views
Refresh Methods for Materialized Views
Complete Refresh
Incremental Refresh
In-Place and Out-of-Place Refresh
Query Rewrite
Overview of Sequences
Sequence Characteristics
Concurrent Access to Sequences
Overview of Dimensions
Hierarchical Structure of a Dimension
Creation of Dimensions
Overview of Synonyms
5
Data Integrity
Introduction to Data Integrity
Techniques for Guaranteeing Data Integrity
Advantages of Integrity Constraints
Types of Integrity Constraints
NOT NULL Integrity Constraints
Unique Constraints
Primary Key Constraints
Foreign Key Constraints
Self-Referential Integrity Constraints
Nulls and Foreign Keys
Parent Key Modifications and Foreign Keys
Indexes and Foreign Keys
Check Constraints
States of Integrity Constraints
Checks for Modified and Existing Data
When the Database Checks Constraints for Validity
Nondeferrable Constraints
Deferrable Constraints
Examples of Constraint Checking
Example: Insertion of a Value in a Foreign Key Column When No Parent Key Value Exists
Example: Update of All Foreign Key and Parent Key Values
6
Data Dictionary and Dynamic Performance Views
Overview of the Data Dictionary
Contents of the Data Dictionary
Views with the Prefix DBA_
Views with the Prefix ALL_
Views with the Prefix USER_
The DUAL Table
Storage of the Data Dictionary
How Oracle Database Uses the Data Dictionary
Public Synonyms for Data Dictionary Views
Data Dictionary Cache
Other Programs and the Data Dictionary
Overview of the Dynamic Performance Views
Contents of the Dynamic Performance Views
Storage of the Dynamic Performance Views
Database Object Metadata
Part II Oracle Data Access
7
SQL
Introduction to SQL
SQL Data Access
SQL Standards
Overview of SQL Statements
Data Definition Language (DDL) Statements
Data Manipulation Language (DML) Statements
SELECT Statements
Joins
Subqueries
Transaction Control Statements
Session Control Statements
System Control Statement
Embedded SQL Statements
Overview of the Optimizer
Use of the Optimizer
Optimizer Components
Query Transformer
Estimator
Plan Generator
Access Paths
Optimizer Statistics
Optimizer Hints
Overview of SQL Processing
Stages of SQL Processing
SQL Parsing
SQL Optimization
SQL Row Source Generation
SQL Execution
Differences Between DML and DDL Processing
8
Server-Side Programming: PL/SQL and Java
Introduction to Server-Side Programming
Overview of PL/SQL
PL/SQL Subprograms
Advantages of PL/SQL Subprograms
Creation of PL/SQL Subprograms
Execution of PL/SQL Subprograms
PL/SQL Packages
Advantages of PL/SQL Packages
Creation of PL/SQL Packages
Execution of PL/SQL Package Subprograms
PL/SQL Anonymous Blocks
PL/SQL Language Constructs
PL/SQL Collections and Records
Collections
Records
How PL/SQL Runs
Overview of Java in Oracle Database
Overview of the Java Virtual Machine (JVM)
Overview of Oracle JVM
Main Components of Oracle JVM
Java Programming Environment
Java Stored Procedures
Java and PL/SQL Integration
JDBC Drivers
SQLJ
Overview of Triggers
Advantages of Triggers
Types of Triggers
Timing for Triggers
Creation of Triggers
Example: CREATE TRIGGER Statement
Example: Invoking a Row-Level Trigger
Execution of Triggers
Storage of Triggers
Part III Oracle Transaction Management
9
Data Concurrency and Consistency
Introduction to Data Concurrency and Consistency
Multiversion Read Consistency
Statement-Level Read Consistency
Transaction-Level Read Consistency
Read Consistency and Undo Segments
Read Consistency: Example
Read Consistency and Interested Transaction Lists
Locking Mechanisms
ANSI/ISO Transaction Isolation Levels
Overview of Oracle Database Transaction Isolation Levels
Read Committed Isolation Level
Read Consistency in the Read Committed Isolation Level
Conflicting Writes in Read Committed Transactions
Serializable Isolation Level
Read-Only Isolation Level
Overview of the Oracle Database Locking Mechanism
Summary of Locking Behavior
Use of Locks
Lock Modes
Lock Conversion and Escalation
Lock Duration
Locks and Deadlocks
Overview of Automatic Locks
DML Locks
Row Locks (TX)
Row Locks and Concurrency
Storage of Row Locks
Table Locks (TM)
Locks and Foreign Keys
Locks and Unindexed Foreign Keys
Locks and Indexed Foreign Keys
DDL Locks
Exclusive DDL Locks
Share DDL Locks
Breakable Parse Locks
System Locks
Latches
Mutexes
Internal Locks
Overview of Manual Data Locks
Overview of User-Defined Locks
10
Transactions
Introduction to Transactions
Sample Transaction: Account Debit and Credit
Structure of a Transaction
Beginning of a Transaction
End of a Transaction
Statement-Level Atomicity
System Change Numbers (SCNs)
Overview of Transaction Control
Transaction Names
Active Transactions
Savepoints
Rollback to Savepoint
Enqueued Transactions
Rollback of Transactions
Commits of Transactions
Overview of Transaction Guard
Benefits of Transaction Guard
How Transaction Guard Works
Lost Commit Messages
Logical Transaction ID
Transaction Guard: Example
Overview of Application Continuity
Benefits of Application Continuity
Use Case for Application Continuity
Application Continuity for Planned Maintenance
Application Continuity Architecture
Overview of Autonomous Transactions
Overview of Distributed Transactions
Two-Phase Commit
In-Doubt Transactions
Part IV Oracle Database Storage Structures
11
Physical Storage Structures
Introduction to Physical Storage Structures
Mechanisms for Storing Database Files
Oracle Automatic Storage Management (Oracle ASM)
Oracle ASM Storage Components
Oracle ASM Instances
Oracle Managed Files and User-Managed Files
Overview of Data Files
Use of Data Files
Permanent and Temporary Data Files
Online and Offline Data Files
Data File Structure
Overview of Control Files
Use of Control Files
Multiple Control Files
Control File Structure
Overview of the Online Redo Log
Use of the Online Redo Log
How Oracle Database Writes to the Online Redo Log
Online Redo Log Switches
Multiple Copies of Online Redo Log Files
Archived Redo Log Files
Structure of the Online Redo Log
12
Logical Storage Structures
Introduction to Logical Storage Structures
Logical Storage Hierarchy
Logical Space Management
Locally Managed Tablespaces
Automatic Segment Space Management
Manual Segment Space Management
Dictionary-Managed Tablespaces
Overview of Data Blocks
Data Blocks and Operating System Blocks
Database Block Size
Tablespace Block Size
Data Block Format
Data Block Overhead
Row Format
Row Header
Column Data
Rowid Format
Data Block Compression
Space Management in Data Blocks
Percentage of Free Space in Data Blocks
Optimization of Free Space in Data Blocks
Optimization by Increasing Free Space
Optimization by Coalescing Fragmented Space
Chained and Migrated Rows
Overview of Index Blocks
Types of Index Blocks
Storage of Index Entries
Reuse of Slots in an Index Block
Coalescing an Index Block
Overview of Extents
Allocation of Extents
Deallocation of Extents
Storage Parameters for Extents
Overview of Segments
User Segments
User Segment Creation
Temporary Segments
Allocation of Temporary Segments for Queries
Allocation of Temporary Segments for Temporary Tables and Indexes
Undo Segments
Undo Segments and Transactions
Transaction Rollback
Temporary Undo Segments
Segment Space and the High Water Mark
Overview of Tablespaces
Permanent Tablespaces
The SYSTEM Tablespace
The SYSAUX Tablespace
Undo Tablespaces
Automatic Undo Management Mode
Automatic Undo Retention
Temporary Tablespaces
Shared and Local Temporary Tablespaces
Default Temporary Tablespaces
Creation of Default Temporary Tablespaces
Access to Temporary Storage
Tablespace Modes
Read/Write and Read-Only Tablespaces
Online and Offline Tablespaces
Tablespace File Size
Part V Oracle Instance Architecture
13
Oracle Database Instance
Introduction to the Oracle Database Instance
Database Instance Structure
Database Instance Configurations
Read/Write and Read-Only Instances
Duration of a Database Instance
Oracle System Identifier (SID)
Overview of Database Instance Startup and Shutdown
Overview of Instance and Database Startup
Connection with Administrator Privileges
How an Instance Is Started
How a Database Is Mounted
How a Database Is Opened
Read-Only Mode
Database File Checks
Overview of Database and Instance Shutdown
Shutdown Modes
How a Database Is Closed
How a Database Is Closed During Normal Shutdown
How a Database Is Closed During Abnormal Shutdown
How a Database Is Unmounted
How an Instance Is Shut Down
Overview of Checkpoints
Purpose of Checkpoints
When Oracle Database Initiates Checkpoints
Overview of Instance Recovery
Purpose of Instance Recovery
When Oracle Database Performs Instance Recovery
Importance of Checkpoints for Instance Recovery
Instance Recovery Phases
Overview of Parameter Files
Initialization Parameters
Functional Groups of Initialization Parameters
Basic and Advanced Initialization Parameters
Server Parameter Files
Text Initialization Parameter Files
Modification of Initialization Parameter Values
Overview of Diagnostic Files
Automatic Diagnostic Repository
Problems and Incidents
ADR Structure
Alert Log
DDL Log
Trace Files
Types of Trace Files
Locations of Trace Files
Segmentation of Trace Files
Diagnostic Dumps
Trace Dumps and Incidents
14
Memory Architecture
Introduction to Oracle Database Memory Structures
Basic Memory Structures
Oracle Database Memory Management
Overview of the User Global Area
Overview of the Program Global Area (PGA)
Contents of the PGA
Private SQL Area
SQL Work Areas
PGA Usage in Dedicated and Shared Server Modes
Overview of the System Global Area (SGA)
Database Buffer Cache
Purpose of the Database Buffer Cache
Buffer States
Buffer Modes
Buffer I/O
Buffer Replacement Algorithms
Buffer Writes
Buffer Reads
Buffer Touch Counts
Buffer Pools
Buffers and Full Table Scans
Default Mode for Full Table Scans
Parallel Query Execution
CACHE Attribute
KEEP Attribute
Force Full Database Caching Mode
In-Memory Area
Redo Log Buffer
Shared Pool
Library Cache
Shared SQL Areas
Program Units and the Library Cache
Allocation and Reuse of Memory in the Shared Pool
Data Dictionary Cache
Server Result Cache
SQL Query Result Cache
PL/SQL Function Result Cache
Reserved Pool
Large Pool
Java Pool
Streams Pool
Fixed SGA
Overview of Software Code Areas
15
Process Architecture
Introduction to Processes
Types of Processes
Multiprocess and Multithreaded Oracle Database Systems
Overview of Client Processes
Client and Server Processes
Connections and Sessions
Database Operations
Overview of Server Processes
Dedicated Server Processes
Shared Server Processes
How Oracle Database Creates Server Processes
Overview of Background Processes
Mandatory Background Processes
Process Monitor Process (PMON) Group
Process Monitor Process (PMON)
Cleanup Main Process (CLMN)
Cleanup Helper Processes (CLnn)
Database Resource Quarantine
Process Manager (PMAN)
Listener Registration Process (LREG)
System Monitor Process (SMON)
Database Writer Process (DBW)
Log Writer Process (LGWR)
LGWR and Commits
LGWR and Inaccessible Files
Checkpoint Process (CKPT)
Manageability Monitor Processes (MMON and MMNL)
Recoverer Process (RECO)
Optional Background Processes
Archiver Processes (ARC
n
)
Job Queue Processes (CJQ0 and Jnnn)
Flashback Data Archive Process (FBDA)
Space Management Coordinator Process (SMCO)
Slave Processes
I/O Slave Processes
Parallel Execution (PX) Server Processes
Query Coordinator
Producers and Consumers
Granules
16
Application and Networking Architecture
Overview of Oracle Application Architecture
Overview of Client/Server Architecture
Distributed Processing
Advantages of a Client/Server Architecture
Overview of Multitier Architecture
Clients
Application Servers
Database Servers
Service-Oriented Architecture (SOA)
Overview of Grid Architecture
Overview of Global Data Services
Purpose of Services
Purpose of GDS
GDS Architecture
GDS Configuration
GDS Pools
GDS Regions
Global Service Managers
GDS Catalog
Overview of Oracle Net Services Architecture
How Oracle Net Services Works
The Oracle Net Listener
Service Names
Service Registration
Dedicated Server Architecture
Shared Server Architecture
Dispatcher Request and Response Queues
Dispatcher Processes (D
nnn
)
Shared Server Processes (S
nnn
)
Restricted Operations of the Shared Server
Database Resident Connection Pooling
Overview of the Program Interface
Program Interface Structure
Program Interface Drivers
Communications Software for the Operating System
17
Oracle Sharding Architecture
About Sharding
Benefits of Sharding
Components of the Oracle Sharding Architecture
Part VI Multitenant Architecture
18
Introduction to the Multitenant Architecture
About the Multitenant Architecture
About Containers in a CDB
About User Interfaces for the Multitenant Architecture
Benefits of the Multitenant Architecture
Challenges for a Non-CDB Architecture
Benefits of the Multitenant Architecture for Database Consolidation
Benefits of the Multitenant Architecture for Manageability
Path to Database Consolidation
Creation of a CDB
Creation of a PDB
About PDB Creation
Creation of a PDB by Cloning
Creation of a PDB from a Seed
Creation of a PDB by Cloning a PDB or a Non-CDB
Creation of a PDB by Plugging In
Creation of a PDB by Plugging In an Unplugged PDB
Creation of a PDB from a Non-CDB
Creation of a PDB by Relocating
Creation of a PDB as a Proxy PDB
Multitenant Environment Documentation Roadmap
19
Overview of the Multitenant Architecture
Overview of Containers in a CDB
The CDB Root and System Container
PDBs
Types of PDBs
Purpose of PDBs
Proxy PDBs
Names for PDBs
Database Links Between PDBs
Data Dictionary Architecture in a CDB
Purpose of Data Dictionary Separation
Metadata and Data Links
Container Data Objects in a CDB
Data Dictionary Storage in a CDB
Current Container
Cross-Container Operations
Overview of Commonality in the CDB
About Commonality in a CDB
Principles of Commonality
Namespaces in a CDB
Overview of Common and Local Users in a CDB
Common Users in a CDB
Local Users in a CDB
Overview of Common and Local Roles in a CDB
Common Roles in a CDB
Local Roles in a CDB
Overview of Privilege and Role Grants in a CDB
Principles of Privilege and Role Grants in a CDB
Privileges and Roles Granted Locally in a CDB
What Makes a Privilege or Role Grant Local
Roles and Privileges Granted Locally
Roles and Privileges Granted Commonly in a CDB
What Makes a Grant Common
Roles and Privileges Granted Commonly
Grants to PUBLIC in a CDB
Grants of Privileges and Roles: Scenario
Overview of Common and Local Objects in a CDB
Overview of Common Audit Configurations
Overview of PDB Lockdown Profiles
Overview of Applications in an Application Container
About Application Containers
Purpose of Application Containers
Key Benefits of Application Containers
Application Container Use Case: SaaS
Application Containers Use Case: Logical Data Warehouse
Application Root
Application PDBs
Application Seed
Application Common Objects
Creation of Application Common Objects
Metadata-Linked Application Common Objects
Metadata Links
Data-Linked Application Common Objects
Extended Data-Linked Application Objects
Application Maintenance
About Application Maintenance
Application Installation
Application Upgrade
How an Application Upgrade Works
Applications at Different Versions
Application Patch
Migration of an Existing Application
Implicitly Created Applications
Application Synchronization
Container Maps
Overview of Services in a CDB
Service Creation in a CDB
Default Services in a CDB
Nondefault Services in a CDB
Connections to Containers in a CDB
Overview of Tablespaces and Database Files in a CDB
Overview of Availability in a CDB
Overview of Backup and Recovery in a CDB
Overview of Flashback PDB in a CDB
Overview of Oracle Resource Manager in a CDB
Part VII Oracle Database Administration and Application Development
20
Topics for Database Administrators and Developers
Overview of Database Security
User Accounts
Privileges
Roles
Privilege Analysis
User Profiles
Database Authentication
Encryption
Network Encryption
Transparent Data Encryption
Oracle Data Redaction
Orientation
Oracle Database Vault
Virtual Private Database (VPD)
Oracle Label Security (OLS)
Data Access Monitoring
Database Auditing
Audit Policies
Audit Administrator Roles
Unified Audit Trail
Enterprise Manager Auditing Support
Oracle Audit Vault and Database Firewall
Overview of High Availability
High Availability and Unplanned Downtime
Site Failures
Computer Failures
Storage Failures
Data Corruption
Human Errors
High Availability and Planned Downtime
System and Database Changes
Data Changes
Application Changes
Overview of Grid Computing
Database Server Grid
Scalability
Fault Tolerance
Services
Oracle Flex Clusters
Database Storage Grid
Overview of Data Warehousing and Business Intelligence
Data Warehousing and OLTP
Data Warehouse Architecture
Data Warehouse Architecture (Basic)
Data Warehouse Architecture (with a Staging Area)
Data Warehouse Architecture (with a Staging Area and Data Marts)
Overview of Extraction, Transformation, and Loading (ETL)
Business Intelligence
Analytic SQL
OLAP
Oracle Advanced Analytics
Oracle Data Mining
Oracle R Enterprise
Overview of Oracle Information Integration
Federated Access
Distributed SQL
Database Links
Information Sharing
Oracle GoldenGate
Oracle Database Advanced Queuing (AQ)
Message Queuing and Dequeuing
Oracle Database Advanced Queuing Features
21
Concepts for Database Administrators
Duties of Database Administrators
Tools for Database Administrators
Oracle Enterprise Manager
Oracle Enterprise Manager Cloud Control
Oracle Enterprise Manager Database Express 12
c
SQL*Plus
Tools for Database Installation and Configuration
Tools for Oracle Net Configuration and Administration
Tools for Data Movement and Analysis
SQL*Loader
Oracle Data Pump Export and Import
Oracle LogMiner
ADR Command Interpreter (ADRCI)
Topics for Database Administrators
Backup and Recovery
Backup and Recovery Techniques
Recovery Manager Architecture
Database Backups
Whole and Partial Database Backups
Consistent and Inconsistent Backups
Backup Sets and Image Copies
Data Repair
Oracle Flashback Technology
Data Recovery Advisor
Block Media Recovery
Data File Recovery
Zero Data Loss Recovery Appliance
Benefits of Recovery Appliance
Recovery Appliance Environment
Memory Management
Automatic Memory Management
Shared Memory Management of the SGA
Memory Management of the Instance PGA
Summary of Memory Management Methods
Resource Management and Task Scheduling
Database Resource Manager
Oracle Scheduler
Performance and Tuning
Database Self-Monitoring
Automatic Workload Repository (AWR)
Automatic Database Monitor (ADDM)
Active Session History (ASH)
Application and SQL Tuning
EXPLAIN PLAN Statement
Optimizer Statistics Advisor
SQL Tuning Advisor
SQL Access Advisor
SQL Plan Management
22
Concepts for Database Developers
Duties of Database Developers
Tools for Database Developers
SQL Developer
Oracle Application Express
Oracle JDeveloper
Oracle Developer Tools for Visual Studio .NET
Topics for Database Developers
Principles of Application Design and Tuning
Client-Side Database Programming
Embedded SQL
Oracle Precompilers
SQLJ
Client-Side APIs
OCI and OCCI
ODBC and JDBC
Globalization Support
Globalization Support Environment
Character Sets
Locale-Specific Settings
Oracle Globalization Development Kit
Unstructured Data
Overview of XML in Oracle Database
Overview of JSON in Oracle Database
What Is JSON?
JSON and XML
Native Database Support for JSON
Overview of LOBs
Internal LOBs
External LOBs
SecureFiles
Overview of Oracle Text
Overview of Oracle Multimedia
Overview of Oracle Spatial and Graph
Glossary
Index
Scripting on this page enhances content navigation, but does not change the content in any way.