Study Notes: oracle of learning a oracle11g architecture overview and logical storage structure


This series is used as study notes, used to record the learning process, learning to deepen the impression, and revisit their own learning content only, reference books as "oracle 11g from entry to the master (Second Edition)" If further study, please purchase original books, thank you!

1, oracle 11g Architecture Overview

1.1 Three important concepts

  • Example: Instance- oracle daemons, and a set of shared memory area allocated in the server;

  • Database: Database- file from the disk-based data, control files, log files, and other parameter files, and archive file consisting of the set of physical

  • Database server: Database Server- refers to the database management tools: three parts (e.g. SQLPLUS, OEM, etc.) and database instances and

The relationship between the three: examples of management and control database, the database provides the data as an example. A database can be loaded and opened a plurality of instances; and only one example of a load and to open the database for its lifetime

Start the database is actually to create a oracle instance in server memory, and then use this instance to access data files and control disk

The basic architecture of the database shown below oracle

1.2 oracle database storage structure

The main function of the database is to store data, stored data is typically referred to as a storage structure of the storage structure into an Oracle database logical storage and physical storage structure.

  • Logical storage configuration: oracle described for organizing and managing data of the internal

  • Physical storage structure: oracle for indicating the physical file in the operating system of the composition

2 logical memory structure

Logical storage structures are logical configuration database slit angle, it is to divide the data stored in the logical structure of the concept.

oracle logical storage structure is a hierarchical structure, mainly by tablespace, segment, and section data etc. fast concept, a plurality of logical storage structure Oracle objects contained in the structure formed from different levels of granularity of data blocks to the tablespace relationship, as shown below:

2.1 the data block (Data Blocks)

The data block is the smallest unit of logical structure of the logical storage oracle, Russian perform database input and output operation amount smallest unit of storage, typically Oracle data block is an integer multiple of the operating system block, if the size of the operating system is fast 2048B, and data oracle block size is 8092b, it indicates that the data block oracle operating system consists of four blocks.

DB_BLOCK_SIZE size oracle database initialization parameters determined by the open sqlplus, connect to the database.


col name format a30
col value format a30
select name,value from v$parameter where name = 'db_block_size'

As follows:

Data block can be stored in the table data, index data and cluster data, regardless of the kind of data stored, its structure is the same.

Data blocks are as follows:

component Explanation
Header Basic information is stored data block, such as the physical address of the block, the type of block belongs segment
List of Tables Storing information table. If the data block is stored in the data table, the heading bell stores information about these tables
Line catalog If the block row has data exists, the information is recorded in the line of these lines directory information includes the address of the row, etc.
Free space A vacant space area is unused block, this area is used to update existing rows and inserting a new line
Line data Local table for storing data and index data, this space has been occupied by the data lines (e.g., data records several rows in the table)

Usually physique, table directory, the directory row collectively referred to as a three-part header information area, the header information region does not store data, which is stored the guidance information for the whole block.

2.2 data area (the Extent)

Data area (extension area may be a data) from the storage structure oracle is a contiguous set of data blocks constituting the oracle, one or more data blocks of a data area, and then one or more regions composed of a data segment (segment) . When all spaces in one segment is used up, Oracle system automatically assigns a new data area for the segment. Oracle data area is the smallest unit of memory allocation, oracle data area is extended as a unit storage space. An oracle object contains at least one data area

2.3 segment (segment)

Segment is composed of one or more data areas, the data area allocated for a particular set of data objects (data, index, rollback, etc.). Data area may comprise a discontinuous segment, and may span multiple files. Size of the data segment table with an increase in the amount of data grows, the process of increasing the data segment is achieved by adding thereto a new data area. oracle database typically has the following four types of segments:

Types of Explanation
Data segment Data records stored in the table, when creating a table, the system automatically creates a table named to the data segment
Index segment It contains an index used to improve system performance
Rollback Rollback segments may also be referred to undo, save rollback entry, oracle the pre-modification mechanism entries stored in rollback
Temporary segments When performing ships index, query and other operations, Oracle may use some temporary storage space for temporarily saving parsed query and generate temporary data sorting process.

2.4 tablespace (TableSpace)

oracle table space using the relevant logical structure (e.g., segments, data zone, etc.) are combined, the largest database table space is logically divided region, typically used to store data tables, indexes, data objects of the database. (segment), any data object must be specified when you create are stored in a table space.

Table space (which is the logical storage structure) and data files (which is the physical storage structure) corresponding to a tablespace by one or more data files, one data file belong to only one tablespace. Each database table has a space (i.e., tablespace system) at least, the size of the table space is equal to the sum of all data files belonging to its size.

When creating the data, the system will automatically default ship plurality of table space, except for the table space management table space than user data, further comprising oracle for managing data within the system (e.g., data dictionary) table space:

2.4.1 system table space.

Table space for storage of data within the system oracle data dictionary and tables, such as table names, column names, user names.

Example: View the data dictionary information in the database by dict:


col table_name for a30
col comments for a30
select * from dict;

Example: View information in the database through the internal information table v $ fixed_view_definition


col view_name for a30
col view_definition for a30
select * from v$fixed_view_definition;

2.4.2 sysaux table space

sysaux table space is newly added oracle 11g tablespace as an auxiliary system tablespace table space, reduce the load on the system table space, main storage data dictionary Unexpected other data objects.

2.4.3 UODO table space.

UODO table space - undo table space, table space for storing revocation information. When the user data table modification operations (including insert, update, delete, etc.), Oracle system automatically uses the temporary storage table space to undo the old data before modification. When changes are made to the operation is completed and submitted command, Oracle retention time is determined according to system setup Suitable freed some space undo tablespaces /

2.4.4 USERS table space.

User table space is recommended ORACLE table space used by the user

In addition to the default oracle table spaces created, the user can create custom tables plurality of spaces according to the actual application and the request stored in the object type.

Guess you like

Origin www.cnblogs.com/yj411511/p/11839397.html