Oracle Database Architecture Summary

Source: Internet
Author: User

Oracle DB Architecture
The Oracle DB Server consists of an Oracle DB and one or more db instances. Instances are composed of memory structures and background processes. Whenever an instance is started, a shared memory area called the system Global Area (SGA) is allocated and a background process is started.
The database includes physical and logical structures. Because physical and logical structures are separate, managing the physical storage of data does not affect access to the logical storage structure.

Oracle's architecture ensures that logical structures are abstracted from the physical structure

Oracle DB Memory Architecture
Oracle DB creates and uses memory structures for a variety of purposes. For example, use memory to store running program code, data that is shared between users, and a private data region for each user that is connected. An instance has two associated basic memory structures:


System Global Zone (SGA): A shared memory structure group called the SGA component that contains data and control information for a single Oracle DB instance. The SGA is shared by all servers and background processes. Examples of data stored in the SGA include cached data blocks and shared SQL regions.


Program Global Zone (PGA): An area of memory that contains data and control information for a server process or background process. The PGA is the non-shared memory that Oracle DB creates when the server process or background process starts. The server process is mutually exclusive to the PGA access. Each server process and background process has its own PGA.

The SGA is the area of memory that contains the data and control information for the instance. The SGA contains the following data structures:


Database buffer cache: used to cache blocks of data retrieved from a database
Redo Log Buffers : Used to cache redo information for instance recovery until it can be written to a physical redo log file stored on disk
shared pools : used to cache various structures that can be shared among users
Large Pools : An optional region that provides large memory allocations for some large processes, such as Oracle backup and recovery operations, and I/O server processes.
java Pools : For all session-specific Java code and data in a Java Virtual machine (JVM)
Streaming Pools : Oracle Streams uses it to store the information needed to capture and apply operations

Common background processes in non-RAC, non-ASM environments include:


Database write process (DBWN)
Log write process (LGWR)
Checkpoint process (CKPT)
System Monitor process (Smon)
Process Monitor process (Pmon)
Recovery process (RECO)
Job Queue Process
Archive process (ARCn)
Queue monitor process (QMNN)

The files that make up Oracle DB can be classified into the following categories:


Control file : Contains data related to the database itself, which is the physical database structure information. These files are critical to the database. Without these files, you cannot open the data file to access the data in the database.
data Files : User or application data that contains a database, and metadata and data dictionaries
Online redo log file : Used for instance recovery of the database. If the database server crashes, but no data files are lost, the instance can use the information in these files to recover the database.


The following additional files are important for running a database successfully:
parameter file : Used to define the configuration at instance startup
password file : Allow Sysdba, Sysoper, and sysasm to connect remotely to the instance and perform administrative tasks
backup files : Used for database recovery. If the original file is damaged or deleted in the event of a media failure or user error, you typically restore the backup file.
Archive Redo log file : Contains a real-time history of data changes (redo) occurrences of an instance. With these files and database backups, you can recover lost data files. In other words, the archive log restores the restored data file.
trace Files : Each server and background process can write to the associated trace file. When the process detects an internal error, the process dumps information about the error to the appropriate trace file. Some of the information that is written to the trace file is provided for the database administrator, and other information is provided for Oracle support Services.
Alert Log Text : These files contain special tracking entries. The alert log for a database is a chronological list of message logs and error logs. Oracle recommends that you review the alert logs regularly.

Logical and physical database structure
The database has a logical structure and a physical structure.


Programme
A scenario is a collection of database objects owned by a database user. A schema object is a logical structure that directly references database data. Schema objects include structures such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links. Typically, scenario objects include everything that an application creates in the database.
Database, table space, and data files

Table Space
The database is divided into logical storage units, called table spaces, that are used to group related logical structures together. For example, a table space typically divides all objects of an application into a group to simplify some administrative operations. You can use one tablespace to hold application data and another to store application indexes.


Data Block
From the bottom up, Oracle DB data is stored in a "data block". A block of data corresponds to the physical database space of a specific number of bytes in the disk. The block size of each tablespace is specified when the table space is created. The database uses and allocates free database space in the Oracle data block.


Area
The next level of logical database space is "zone". A zone is a specific number of contiguous blocks of data (obtained by a single assignment) that are used to store specific types of information.


segment
The logical database storage layer above the zone is called "segment". A segment is a set of extents assigned to a logical structure. For example:


data Segments : Each non-clustered, index-organized table has one data segment, except for external tables, global temporary tables, and partitioned tables, each of which has one or more segments. All the data in the table is stored in the extents of the corresponding data segment. For partitioned tables, each partition has a data segment. Each cluster also has a data segment. The data for each table in the cluster is stored in the data segment of the cluster.
index Segments : Each index has an index segment that stores all of its data. For partitioned indexes, each partition has an index segment.
Restore Segments : Create an UNDO table space for each DB instance. The tablespace contains a large number of restore segments that are used to temporarily store restore information. The information in the restore segment is used to generate read-consistent database information, and is used to roll back uncommitted transactions for the user during the database recovery process.
Temporary segment : The temporary segment is created by Oracle DB when a temporary workspace is required to execute the SQL statement. When the statement finishes executing, the extents of the temporary segment are returned to the instance for future use. Specify a default temporary tablespace for each user, or specify a default temporary tablespace to use in the database scope.
Oracle DB dynamically allocates space. If the existing area in the segment is full, additional areas will be added. Because the extents are allocated as needed, the extents in the segment may or may not be adjacent to the disk.

table spaces and data files
The database is divided into "table spaces", which are logical storage units that can be used to group related logical structures together. Each database is logically divided into one or more table spaces. One or more data files are explicitly created for each tablespace to store the data for all logical structures in the table space physically.

The Ystem and Sysaux table spaces are the table spaces that must exist when the database is created. These table spaces must be online.
The SYSTEM tablespace is used for core functions (for example, data dictionary tables).
The secondary Sysaux table space is used for attached database components (for example, Enterprise Manager Repository).

Database architecture: Structural Components Summary:


Memory structure:
System global Area (SGA): Database buffer cache, redo buffers, and various pools
Program Global Zone (PGA)
Process structure:
User processes and Server processes
Background processes: Smon, Pmon, Reco, Dbwn, CKPT, LGWR, ARCn, etc.
Storage structure:
Logic: Database, Schema, tablespace, segment, zone, and Oracle blocks
Physical: Data files, control files, and redo log files

Oracle Database Architecture Summary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.