Storage hierarchy in Oracle

Source: Internet
Author: User

The storage hierarchy in Oracle is as follows:

(1) A database consists of one or more tablespaces.

(2) A tablespace consists of one or more data files. These files can be cooked files in the file system, original partitions, database files managed by ASM, or files on the cluster file system. Tablespace contains segments.

(3) segments (such as table and index) are composed of one or more segments. Segments are in the tablespace, but can contain data in multiple data files in the tablespace.

(4) The partition is a logical continuous block on the disk. The partition is only in one tablespace and is always in one file in the tablespace.

(5) blocks are the smallest allocation units in the database and the smallest I/O units used by the database.

Note:

 

Table
A container contains segments. Each segment belongs to only one tablespace. A tablespace may have multiple segments. All segments of a given segment are in the tablespace associated with the segment. Segment will never span the table
Spatial Boundary. The tablespace itself can have one or more related data files. A partition of a given segment in a tablespace is completely contained in a data file. However, segments can have segments from multiple different data files.
The tablespace is shown in Figure 3-3.


Figure 3-3 The tablespace contains two data files, three segments, and four segments.

Figure 3-3 shows a tablespace named user_data. There are two data files: user_data01 and user_data02. Three segments are allocated: T1, T2, and I1 (maybe two tables and one index ). This tablespace is allocated with four segments, each representing a group of database blocks that are logically allocated consecutively. Segment T1 contains two segments, which are in different files. Each segment T2 and I1 have a CIDR block. If the tablespace requires more space, you can adjust the size of the data file that has been allocated to the tablespace, or you can add a third data file.

A tablespace is a logical storage container in Oracle. As a developer, we will create segments in the tablespace without going deep into the original "file-level ". We do not want to allocate segments in a specific file (of course, this is also acceptable, but we generally do not do this ). Instead, we will create objects in the tablespace, and Oracle will be responsible for the rest of the work. If the DBA decides to move data files on the disk at a certain time in the future to make the I/O distribution more even, it does not matter to us and it will not affect our processing at all.

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.