Arch 2
Arch 2
Arch 2
The Oracle
structure.
Logical Structure
The logical structure for Oracle RDBMS consists of the following elements:
• Tablespace
• Schema
Tablespace
Oracle uses the SYSTEM tablespace to store information like the data dictionary.
Data dictionary stores the metadata (or the data about data). This includes
information like table access permissions, information about keys etc.
Data is stored in the database in form of files called as datafiles. Each Tablespace is a
collection of one or more Datafiles. Each data file consists of ‘Data blocks’, ‘extents’ and
‘segments’.
Data Blocks
At the finest level of granularity, an ORACLE database's data is stored in data blocks (also
Extents
The next level of logical database space is called an extent. An extent is a specific number
of contiguous data blocks that are allocated for storing a specific type of information.
Segments
The level of logical database storage above an extent is called a segment. A segment is a
set of extents that have been allocated for a specific type of data structure,
and all 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. ORACLE
allocates space for segments in extents. Therefore, when the existing extents of a segment
are full, ORACLE allocates another extent for that segment. Because extents are allocated
as needed, the extents of a segment may or may not be contiguous on disk, and may or
may not span files.
• Tables
• Clusters
• Indexes
• Views
• Stored procedures
• Triggers
• Sequences
Physical Structure
The physical layer of the database consists of three types of files:
1. One or more Datafiles
2. Two or more redo log files
3. One or more control files
Datafiles (.dbf files):
Datafiles store the information contained in the database. One can have as few as one data
file or as many as hundreds of datafiles. The information for a single table can span many
datafiles or many tables can share a set of datafiles. Spreading tablespaces over many
datafiles can have a significant positive effect on performance. The number of datafiles that
can be configured is limited by the Oracle parameter MAXDATAFILES.
When a transaction occurs in the database, it is entered in the redo log buffers, while the
data blocks affected by the transactions are not immediately written to disk. In an
Oracle database there are at least three or more Redo Log files.
Oracle writes to redo log file in a cyclical order i.e. after the first log file is filled, it writes to
the second log file, until that one is filled. When all the Redo Log files have been filled, it
returns to the first log file and begin overwrite its content with new transaction data. Note,
if the database is running in the ARCHIVELOG Mode, the database will make a copy of the
online redo log files before overwriting them.
Next Page: Oracle 10g Free Training: Oracle Concepts and Database Architecture - Page 2