In this Structure of a Database post, we will learn about the physical database design.
An Oracle database is a set of files that store Oracle data in persistent disk storage. This section discusses the database files generated when you issue a CREATE DATABASE statement:
Oracle database is nothing but the physical files, the following are the three important types of physical files.
Control files: A control file is a root file that tracks the physical components of the database.
Redo log files: The online redo log is a set of files containing records of changes made to data.
Data files and temp files: A data file is a physical file on disk that was created by Oracle Database and contains data structures such as tables and indexes. A temp file is a data file that belongs to a temporary tablespace. The data is written to these files in an Oracle proprietary format that cannot be read by other programs.
Logical Storage Structures
Oracle Database allocates logical space for all data in the database. The logical units of database space allocation are data blocks, extents, segments, and tablespaces. At a physical level, the data is stored in data files on disk. The data in the data files are stored in operating system blocks.
A tablespace is a storage location where the actual data underlying database objects can be kept.
An extent is a set of logically contiguous data blocks allocated for storing a specific type of information
A segment is a set of extents allocated for a specific database object, such as a table.
A data block is the smallest logical unit of data storage in Oracle Database
Oracle Block contents:
The following figure shows the Oracle data block contents
Every data block has a format or internal structure that enables the database to track the data and free space in the block. This format is similar whether the data block contains table, index, or table cluster data. The figure shows the format of an uncompressed data block.The block overhead includes the following parts:
- Header
- Table directory
- Row directory
- Free Space
- Row Data
a)Header: contains generic information like block address and type of segment (index, data..)
b)Table Directory: contains information about table having rows in that block
c) Row Directory: contains information about actual row contained in that block
d) Free Space: available space in the data block for additional row or update of a row which require more space.
e) Row Data contains a table or index data.First three component of a data block (Header, Table & Row directory) collectively known as Overhead.
Words from dbapath
Thank you for giving your valuable time to read the above information. I hope the content served your purpose in reaching out the blog.
Suggestions for improvement of the blog are highly appreciable. Please contact us for any information/suggestion/feedback.
If you want to be updated with all our articles
please follow us on Facebook | Twitter
Please subscribe to our newsletter.