Logical storeage Hierarchy In Oracle

Oracle Database allocates logical space for all data in the database.The Oracle database is divided into increasingly smaller logical units to manage, store, and retrieve data efficiently and quickly. The logical storage management of the database’s data is independent of the physical storage of the database’s physical files on disk. This makes it possible for changes you make to the physical structures to be transparent to the database user or developer at the logical level.logical storage structures, including segments, extents, and data blocks.
 
Tablespaces
The data in an Oracle database are stored in tablespaces.
 
-- An Oracle database can be logically grouped into smaller logical areas of space known as tablespaces. 
-- A tablespace can belong to only one database at a time.
-- Each tablespace consists of one or more operating system files, which are called data files.
-- A tablespace may consist of zero or more segments.
-- Tablespaces can be brought online while the database is running.
-- Except for the SYSTEM tablespace or a tablespace with an active undo segment, tablespaces can be taken offline, leaving the database running.
-- Tablespaces can be switched between read-write and read-only status.

Data Files 
-- Each tablespace in an Oracle database consists of one or more files called data files. These are physical structures that conform with the operating system on which the Oracle server is running.
-- A data file can belong to only one tablespace.
-- An Oracle server creates a data file for a tablespace by allocating the specified amount of disk space plus a small amount of overhead.
-- The database administrator can change the size of a data file after its creation or can specify that a data file should dynamically grow as objects in the tablespace grow.

Segments
 
-- A segment is the space allocated for a specific logical storage structure within a tablespace. For example, all of the storage allocated to a table is a segment.
-- A tablespace may consist of one or more segments.
-- A segment cannot span tablespaces; however, a segment can span multiple data files that belong to the same tablespace.
-- Each segment is made up of one or more extents.
 
Extents
Space is allocated to a segment by extents.
-- One or more extents make up a segment.
  • When a segment is created, it consists of at least one extent.
  • As the segment grows, extents get added to the segment.
  • The DBA can manually add extents to a segment. 
-- An extent is a set of contiguous Oracle blocks.
-- An extent cannot span a data file but must exist in one data file.

Data BlocksThe Oracle server manages the storage space in the data files in units called Oracle blocks or
data blocks.
-- At the finest level of granularity, the data in an Oracle database is stored in data blocks.
-- Oracle data blocks are the smallest units of storage that the Oracle server can allocate, read, or write.
-- One data block corresponds to one or more operating system blocks allocated from an existing data file.
-- The standard data block size for an Oracle database is specified by the DB_BLOCK_SIZE initialization parameter when the database is created.
-- The data block size should be a multiple of the operating system block size to avoid unnecessary I/O.
• The maximum data block size is dependent on the operating system.

People who read this post also read :



0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More