Data Blocks, Extents, Segments, Segments Oracle

By

Oracle Database is divided into Logical and Physical structure. This article, mainly covers some of the Logical structure or the Logical database that comprises in oracle. These are  Blocks, Extents and segments. Each of these logical structure are related with each other or in a simpler language each of these logical structure are related with each other as logical structure.. Article briefly describe each and relation between these logical structures existing in Oracle database.

Lets start with the smallest storage logical structure that called as BLOCKS. Oracle data blocks are the smallest logical storage area that stores records. Each data blocks are assigned with a storage space generally 2048K. Records are logically stored in these blocks that fits in the total allocated space(Block Size), as pre-defined. But the total available space is not actually the allocated free space for storage, since part of the space is allocated with Table constraints like PCT_FREE  and PCT_USED. We are not covering PCT_FREE & PCT_USED in this article. So Data block in oracle can be the logical storage granules. Data blocks corresponds to a specific number of bytes of physical database space on disk. 

Total number of Data block Blocks that allocated in a common storage area, is called EXTENTS. It is next higher level of logical database space is an extent, while inner most storage are Data blocks. Extents can be further defined as and area allocated to store number of contiguous data blocks or array of BLOCKS allocated for storing a specific type of information.

The highest level among the BLOCKS,EXTENT and SEGMENT is SEGMENTS.

SEGMENTS are logical database storage greater than an EXTENT. A segment is a set of extents, each of which has been allocated for a specific data structure and all of which are stored in the same tablespace. For example, each table's data is stored in its own data segment, while each index's data is stored in its own index segment. If the table or index is partitioned, each partition is stored in its own segment.

Segments store extents. The number of extents stored in the segment grows dynamically. As Oracle allocates space for segments in units of one extent. When the existing extents of a segment are full, Oracle allocates another extent for that segment. Furthermore, Extents are allocated in Segment on demand,extents of a segment may or may not be contiguous on disk. A segment and all its extents are stored in one tablespace ( another logical structure of oracle database).