Oracle tablespace, data file, user

Source: Internet
Author: User
Tags one table

Each Oracle database is comprised of three types of files: A data file, a log file, and a control file. The database's files provide true physical storage for database information.
Each database has one or more physical data files. The data for a logical database structure (such as tables, indexes, and so on) is physically stored in the data file of the database, and the data file is usually in *.dbf format.

The data file has the following characteristics:

1, a data file only with a database contact;

2, once the establishment, the data file only increases not to reduce;

3. A tablespace (a logical unit of database storage) consists of one or more data files.
Second, let's describe the logical structure of Oracle: The logical Structure of Oracle consists of a tablespace (tablespace), a segment (segment), a zone (extent), and a data block, which can be clearly seen.


The Oracle database is logically composed of more than one table space, and the tablespace contains the data file or files physically. The data file size is an integer multiple of the block size, and the objects stored in the tablespace are called segments, such as data segments, index segments, and fallback segments. Segments are composed of zones, which are the smallest units of disk allocation. The increase of the segment is achieved by increasing the number of zones. The size of each area is an integer multiple of the block size, the size of the extents can be different, the data block is the smallest I/O unit in the database, and is also the unit of the memory data buffer, and the data file storage space unit. The size of the block is set by the parameter db_block_size, and its value should be set to an integer multiple of the operating system block size.
1. Table Space
A tablespace is the largest logical unit in a database, and each table space consists of one or more data files, and a data file can only be associated with one table space. Each database has a system tablespace that is created automatically during database creation or database installation, data dictionary tables for storage systems, program system units, process functions, packages, and triggers, and can also be used to store user data tables and indexed objects. Tablespaces have online and offline (offline) properties that allow you to place any table space except Systme offline.
2. Paragraph
The segments of a database can be divided into four categories: Data segments, index segments, fallback segments, and temporary segments.
3. District
Zone is the smallest unit of disk space allocation. Disks are partitioned, allocating at least one zone at a time. Zones are stored in segments, which consist of contiguous blocks of data.
4. Data block
The data block is the smallest data organization unit and Management Unit in the database, is the data file disk storage space unit, is also the smallest unit of database I/O, the block size is determined by the Db_block_size parameter, the default value of different Oracle version db_block_size is different.
5. Schema
Schema typically corresponds to a user one by one, which is a collection of objects (schema objects), including: Table (tables), cluster (clusters), view (views), index (indexes), serial number (sequences), Synonyms (synonyms), program units (Programs unit), database links, and so on.
Finally, let's take a look at the relationship between Oracle's user, table space, and data files:
One user can use one or more table spaces, and a table space can be used by multiple users. There is no affiliation between user and table space, which is a logical concept used to manage data storage, where the tablespace is only related to the data file, the data file is physical, a table space can contain multiple data files, and a data file can only belong to one table space.
The best way to explain the database, table space, data files, tables, data is to imagine a cabinet filled with things, the database is actually cabinets, cabinets drawer is a table space, drawer folder is a data file, folder of paper is a table, the information written on the paper is data.

Oracle tablespace, data file, user

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.