This is part 2 of our overview of the Oracle database architecture. Although this article is specific to Oracle 11g architecture, most of the information is applicable to previous versions of Oracle. There may be extra memory structures and background processes or the name of an object may change but the underlying Oracle architecture for Oracle 11g hasn't changed significantly from earlier versions.
Part 1 covered the main components of the Oracle architecture including
Oracle server concepts and terminology.
This article will cover the logical architecture of the physical data files that are part of an Oracle database.
In an Oracle database all data is ultimately stored in files on one or
more disks. Which files are on which disk is not really relevant to our discussion - storage may be virtualised or may be managed by a special type of Oracle instance called ASM (Automatic Storage Management). The disks may also be formatted with a file system or just as raw devices such as on Unix/Linux systems.
Therefore, the least granular object in the Oracle database architecture is the data file (ignoring physical objects such as disks, disk partitions, logical volumes, etc.) and every database must have at least one data file.
A data file is a physical structure that contains a tablespace which is a logical structure. A data file can hold only one tablespace but a tablespace may extend over more than one datafile.
A tablespace is a logical grouping of segments, usually of one type but not necessarily so. A tablespace may therefore mix index and table sgements.
A segment is a logical grouping of extents of one type of database object (index ,table, undo, temporary). A segment may span several data files but cannot span more than one tablespace.
An extent comprises one or more contiguous Oracle data blocks allocated in one go. An Oracle block may be an integral multiple of physical blocks on the disk.
Oracle Tips & Tricks to SKYROCKET Your Career!
If you're not already a subscriber to our ezine you're missing out on a myriad of tips and techniques to help you become a better, faster, smarter Oracle developer or DBA. Subscribe now and ignite your career.
A tablespace, as mentioned, is a logical grouping of segments and can be of several types:
Every Oracle database must have a system tablespace and a sysaux tablespace.
The system tablespace holds the objects needed for the database to run such as the data dictionary and the system rollback segment.
The sysaux tablespace is an auxilliary tablespace for the system tablespace. This holds information about various Oracle products and features used by the databases as well as their schema objects.
As with tablespaces there are different types of segments:
Extents are logical units of database storage made up of logically contiguous data blocks. Whilst logically contiguous, they might not be physically contiguous on the disk if RAIDs are being used or because of file system implementations. An extents is always contained in one data file.
An initial extent for a data segment is allocated by default when the segment is created. Although the blocks in this initial extent are empty, they are exclusively reserved for this segment and cannot be used by any other segment unless they are deallocated (dropped) from the current . The first data block of every segment contains a directory of the extents in the segment.shows the initial extent in a segment in a data file that previously contained no data.