Oracle database architecture

Source: Internet
Author: User
Oracle DatabaseThe architecture includes four aspects: DatabasePhysical structure, logical structure, memory structure and process.
  
1. Physical Structure
  
Physical DatabaseStructure is composed DatabaseDepends on the operating system file, Oracle DatabaseFiles include:
  
Data File)
Data Files for storage DatabaseAll data in, such DatabaseTable data and index data are generally in the *. DBF format, for example, usercims. DBF.
  
Log File)
Log files are used to record DatabaseAll changes made (such as adding, deleting, and modifying) can be used Database. The name is usually in log *. DBF format, for example, log1cims. DBF and log2cims. DBF.

Www.bitscn.net China Network Management blog

  
Control File)
Each OracleDatabaseAll have corresponding control files, which are smaller binary files for recordDatabasePhysical structure, such:DatabaseName,DatabaseThe name and location of the data file and log file. Open and accessDatabase. The name is usually in ctrl * CTL format, for example, ctrl1cims. CTL.
  
Configuration File
Configuration file record OracleDatabaseSome important parameters during the runtime, such as the size of the data block and the configuration of the memory structure. The name is usually in the init *. ora format, for example, initcims. ora.
  
2. Logical Structure
  
OracleDatabaseThe logical structureDatabaseHow to store data logicallyDatabase. The logical structure includes the tablespace, segment, partition, data block, and mode object.DatabaseThe logical structureDatabaseHow to use the physical space of the system. The relationship between the pattern object and its relationship is described.DatabaseBetween.

Play.bitscn.com tired?

  
OneDatabaseLogically, it is composed of one or more tablespaces. The tablespace isDatabaseA data warehouse in a physical group. Each tablespace is composed of segments, a segment is composed of a group of partitions (extent), and a partition is composed of a group of consecutiveDatabaseBlock (Database block), andDatabaseBlock corresponds to one or more physical blocks on the hard disk. One tablespace stores one or moreDatabaseA physical file (that is, a data file ).DatabaseThe data in is logically stored in the tablespace.
  
Table space)
OracleDatabaseIt is divided into one or more logical structures called tablespaces. It includes two types of tablespaces: System tablespaces and non-system tablespaces. The system tablespaces are installedDatabaseAutomatically created when, it containsDatabaseThe definition of all data dictionaries, stored procedures, packages, functions and triggers, and system rollback segments. In addition, it can contain user data .. Bbs.bitscn.com the earliest Network Management Forum in China
  
A tablespace contains many segments, each of which may be discontinuous. Each partition is composed of a group of continuous data blocks.DatabaseThe minimum unit for the operation.
  
Each tablespace corresponds to one or more data files. Each data file can belong to only one tablespace.
  
  DatabaseBlock (Database block)
  DatabaseA block is also called a logical block or an oracle block. It corresponds to one or more physical blocks on the disk. Its size is determined by the initial parameter DB-block-size (in the file init. in ora), the typical size is 2 K. The pckfree and pctused parameters are used to optimize the use of data block space.
  
Partition (extent)
A zone is composed of a group of continuous data blocks.DatabaseThe logical unit of storage space allocation.
  
Segment (segment)
A segment is a collection of one or more non-consecutive zones. It contains all data in a specific logical structure in a tablespace. segments cannot be stored across tablespaces. OracleDatabaseIncluding data segment, index segment, temporary segment, and rollback segment.
  
Schema object)

Search for so.bitscn.com

OracleDatabaseThe schema objects include tables, views, sequences, consent words, indexes, triggers, and stored procedures. They will be highlighted in the following sections.
  
3. Oracle server system process and Memory Structure
  
When oracle is started on a computer serverDatabaseThen, an oracle instance is started on the server ). Oracle instances are access and controlDatabaseIt includes two parts: the system global zone (SGA) and the Oracle process. SGA is a group of shared memory buffers allocated by the system for instance storage.DatabaseInstance and control information to achieveDatabaseData management and operations.
  
Process is an extremely important concept in the operating system. A process executes a group of operations to complete a specific task.DatabaseIn the management system, processes are composed of user processes, server processes, and background processes.
  
When a user runs an application, the system creates a user process for it. The server process processes the requests of the user processes connected to it. It communicates with the user process and serves the Oracle request of the connected user process.

You can search for the so.bitscn.com network management database

  
To improve system performance and better implement multi-user functions, Oracle also starts some background processes in the system backgroundDatabaseData operations.
  
The background processes of system processes mainly include:
SMON system monitoring process: (system monitor) is responsible for completing automatic instance recovery and sort tablespace.
Pmon process monitoring process: (Process Monitor) implements fault recovery for user processes, cleans up the memory zone, and releases resources required for the process.
DbwrDatabaseWrite process:DatabaseBuffer management process. Under its management,DatabaseThere is always a certain number of free buffers in the buffer to ensure that the user process can always find the free buffer.
Lgwr Log File Writing Process: A log buffer management process that writes log entries in the log buffer to the log files on the disk. Each instance has only one lgwr process.
Arch archiving process: (archiver process) copies the filled online log files to a specified storage device. Arch is performed only when the log file group switch appears. Arch is not required, but is issued only when automatic archiving is available or when manual archiving requests are made. Feedom.net is our mission to focus on Network Management
Reco recovery process: a process used when distributed options are available. It is mainly used to resolve faults that occur when distributed transactions are referenced. It can only appear in systems that allow distributed transactions.
Lckn blocking process: used for Parallel Server systems, mainly to block instances.
Memory Structure (SGA)
SGA is a group of shared memory buffers allocated by Oracle for an instance. It contains the data and control information of the instance. SGA is automatically allocated when the instance is started, and is withdrawn when the instance is closed.DatabaseAll data operations must be performed through SGA.
  
The memory in SGA can be divided into the following areas based on the storage information:
  
Buffer cache: StorageDatabaseMediumDatabaseBlock copy. It is composed of a group of buffer blocks, which are shared by all user processes linked to the instance. The number of buffer blocks is determined by the initialization parameter db_block_buffers. The size of the buffer block is determined by the initialization parameter db_block_size. Large data blocks increase the query speed. It is operated by dbwr.
  
B. Log buffer redo log Buffer: stores data operation changes. They are stored in the log buffer as a log entry. When necessaryDatabaseThe log item is used to reconstruct or roll backDatabaseThe changes made. The size of the log buffer is determined by the initialization parameter log_buffer. A large log buffer can reduce the number of log file I/O times. The background process lgwr writes the information in the log buffer to the log file on the disk. You can start the arch background process to archive the log information. Feedom.net, the earliest website administrator in China
  
C. Shared Pool: Contains SQL statement information for processing. It includes the shared SQL area and data dictionary storage area. The shared SQL area contains the information used to execute specific SQL statements. The data dictionary area is used to store data dictionaries, which are shared by all user processes.
  
Cursors: memory pointer for executing SQL statements to be processed
Other information areas: In addition to the above information areas, it also includes communication information between processes (such as blocking information). In the multi-clue server configuration, there are some information about the global area of the program, request queue and response queue.

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.