Home » Oracle Basics » 01 - An Introduction to Databases and Oracle
1

Oracle - Physical Storage

The physical location of files

Tablespaces are physically located in one or more datafiles on the hard drive of the computer. Datafiles have the extension '.DBF' and are made up of Data blocks, extents and segments. A data block is the smallest unit of Oracle data storage. An extent is a series of contiguous data blocks allocated for storing a specific type of data. A Segment is a set of extents stored in the same tablespace and allocated for a specific type of information. For example, a single data segment stores a table's data and a single index segment stores an index's data. If the table 'grows' (i.e. new rows are added to it) and all existing extents within the segment are full, Oracle automatically allocates another extent for the segment. The extents that make up a segment are not necessarily contiguous on the hard disk because new extents are added on an as-needed basis. A Data segment stores user data while an index segment stores indexes. A Rollback segment stores information that is necessary to 'undo' an operation and rollback changes to the database. Temporary segments are created when a SQL command requires a temporary work area for its data and are re-initialized when the command completes execution. Sorting and aggregate operations use temporary segments to store transient information.