Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Logical structure Analysis of oracle

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The logical structure of oracle includes table space (tablespace), segment (segment), area (extent), data block (data block).

Oracle database is logically composed of multiple tables, and the objects stored in the table space are called segments, such as data segments, index segments, and fallback segments. A segment consists of zones, which are the smallest unit of disk allocation. The increase of segments is realized by increasing the number of areas. The size of each area is an integral multiple of the size of the data block, and the size of the area can be different; the data block is the smallest I Universe O unit in the database, as well as the unit of data buffer in memory, and the unit of storage space for data files. The size of the block is set by the parameter DB_BLOCK_SIZE, which should be set to an integral multiple of the operating system block size.

Tablespace

Table space is the largest logical structure of Oracle database. An Oracle database is logically composed of multiple table spaces, and one table space belongs to only one database. There is a tablespace in Oracle called SYSTEM, which is created automatically when the database is created or installed. Mainly used to store the system's data dictionaries, procedures, functions, triggers, etc.; can also store users' tables, indexes, etc. A tablespace can have multiple data files, but a data file can only belong to one tablespace.

A table space is a disk area, which consists of one or more disk files, and a table space can hold many tables, indexes, clusters, and so on. Each tablespace has a prefabricated disk area called the initial interval (initial extent), and then use the next one after using this interval until the tablespace is used up, when it is necessary to expand the tablespace, add data files or expand existing data files.

Segment

Segments in Oracle can be divided into four types: data segment, index segment, rollback segment, temporary period.

The data segment is used to store the user's data, and each table has a corresponding rollback segment with the same name as the data table. The index segment is used to store the index information of the system and users. The rollback segment is used to store the pre-modified value of the user data. The fallback segment has an one-to-many relationship with the transaction. A transaction can only use one fallback segment, while one fallback segment can store the fallback data of one or more transactions. Temporary periods are used for sorting order by statements and some summaries.

Zone

A zone is the smallest unit of disk space allocation. The disk is divided by zone, allocating at least one zone at a time. The zone is stored in a segment and consists of consecutive blocks of data. In the process of zone allocation, 5 districts are allocated at a time. If there is less than five zones of free space left, an error occurs: ORA-01653. You can query the information in the tablespace through the dictionary dba_tablespaces. You can query the information in the middle of the segment through the dictionary user_tables. The allocation status of the area can be queried through the dictionary user_extents. We can query the allocation information of tablespace, segment, and central area through the following SQL statement.

SQL > select * from dba_tablespaces;SQL > select table_name, tablespace_name, min_extents, max_extents from user_tables; SQL > select * from user_extents

Data block

The data block is the smallest data organization unit and management unit in the data, the disk storage space unit of the data file, and the smallest unit of the database DB_BLOCK_SIZE O. The data block size is determined by the DB_BLOCK_SIZE parameter, and the default values of different oracle versions of DB_BLOCK_SIZE are different.

Summary

The above is the whole content of the logical structure analysis of oracle in this paper. I hope it will be helpful to you. Interested friends can refer to: Oracle RMAN automatic backup control file method introduction, oracle length, lengthb, substr, substrb function usage introduction, oracle database startup phase analysis and so on. If you have any questions, please leave a message and the editor will reply to you in time. Thank you for your support to the website.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report