search
Homephp教程PHP开发Logical structure in ORACLE database

The logical structure of ORACLE is composed of one or more table spaces. A database is divided into one or more logical units. This logical unit is called a table space. A tablespace groups related logical structures together.
A table space consists of a set of classification segments.
A segment consists of a set of ranges.
A range consists of a batch of database blocks.
A database block corresponds to one or more physical blocks.
Each ORACLE database contains a table space named SYSTEM, which is automatically created when the database is created. This table space contains the system information data of the entire database. The smallest database only needs the SYSTEM table space. The table space can be expanded by adding data files. The size of the table space is the sum of the sizes of the data files that make up the table space. A table space in the ORACLE database is composed of one or more physical data files, and one data file can only be associated with one table space. When creating a data file for a table space, ORACLE creates the file and allocates the specified disk space capacity. After the data file is initially created, the allocated disk does not contain any data.
A schema is a collection of schema objects, and each database user corresponds to a schema. Schema objects are logical structures that directly reference database data. Schema objects include structures such as tables, views, indexes, and synonyms. Schema objects are logical data storage structures, and each schema object does not have a corresponding file on disk to store its information. A schema object is logically stored in a table space in the database, and the data for each object is physically contained in one or more data files in the table space. For example: schema objects such as tables and indexes, how much space is allocated for this object on the data file of the specified table space. Figure 1-5 illustrates the relationship between schema objects, table spaces, and data files.
The relationship between schema and table space is: one table space can contain objects of different schemas, and objects in one schema can be contained in different table spaces.
1. Database block
Database block is the lowest layer of ORACLE logical allocation space, also known as logical block, page or ORACLE block.
A database block is the smallest unit of space used and allocated by the database. It can also be said to be the smallest I/O unit used. A data block is consistent with the size of the physical space specified on the disk. A database block corresponds to one or more physical blocks. The size of the block is determined by the parameter db_block_size.
PCTFREE and PCTUSED are parameters used by developers to control the amount of free space available in a data block for inserting and updating data.
PCTFREE: Set the percentage of data blocks that remain free.
PCTUSED: When the free space of the data block reaches PCTFREE, data is not allowed to be inserted into this block. Only rows in the block can be modified or deleted. When updating, the free space of the data block may become larger and the used data space becomes smaller. When the data block has been When the used space is lower than PCTUSED, data can be re-inserted.
Selection of PCTFREE and PCTUSED:
For tables that are frequently queried (selected), PCTFREE should be made smaller to minimize waste of storage space.
For tables that frequently perform inserts, PCTUSED should be larger.
For tables that are frequently updated, the PCTFREE should be larger to leave more space for updates and reduce row movement.
 Note:
These two parameters can only be specified when creating or modifying tables and clusters (data segments). In addition, only the PCTFREE parameter can be specified when creating or modifying an index (index segment).
Examples of table settings that are frequently inserted:
create table COMMINFOR
( SERIALNUMBER TBEGINTIME DATE null ,
ACCEPTDURATION NUMBER(10) null ,
ACCEPTERNO VARCHAR2(4) null ,
CALLINGPHONENO VARCHAR2(20) null ,
ACCEPTID NUMBER(10) null ,)

The above is the logical structure in the ORACLE database, please pay attention to PHP Chinese for more related articles Net (www.php.cn)!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.