0% found this document useful (0 votes)
19 views9 pages

Slides (Lec 6)

Database administrator chapter 6

Uploaded by

bibimemoona07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views9 pages

Slides (Lec 6)

Database administrator chapter 6

Uploaded by

bibimemoona07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Managing Database Storage Structures

Storage Structures

Logical Structures
Database: This is the top-level logical structure in Oracle.
It contains all the database objects such as tables,
indexes, and views.
Tablespace: A tablespace is a logical storage unit within
an Oracle database. It is used to group related logical
structures together. A database can have multiple
tablespaces. It contains segments which store database
objects like tables.
Segment: A segment is a set of extents allocated for a
specific type of data structure, such as a table, index, or
partition. Each segment is contained within a tablespace.
Extent: An extent is a specific number of contiguous data
blocks in a database, allocated for storing a specific type
of information. Extents are allocated as needed when the
data in a segment grows.
Oracle Data Block: The smallest unit of storage in the
Oracle database, analogous to a block in the file system.
It is the level at which Oracle stores data.
Physical Structures
OS File (Operating System File): The physical files on
the storage system where the data is stored. Each
tablespace is mapped to one or more OS files.
OS Block (Operating System Block): The smallest unit
of data that the operating system can manage. Oracle
data blocks are mapped to OS blocks, though an Oracle
data block can span multiple OS blocks.
Relationships
Tablespace to OS File: A tablespace is logically
represented by one or more OS files. This means the
tablespace's data is stored in these files at the OS level.
Oracle Data Block to OS Block: Each Oracle data block
is physically stored in one or more OS blocks. The OS
block size is usually fixed, but Oracle data blocks can be
configured to be a multiple of OS blocks.
How Table Data Is Stored

Tablespace: The tablespace is a logical storage unit in the


Oracle database. It contains segments which store database
objects like tables.
Segment: Within a tablespace, there are segments allocated
to specific database objects. For example, "Table A" and "Table
B" each have their own segment. A segment contains all the
data for that particular table.
Table: A table is a logical structure that consists of rows and
columns. Each row represents a record, and each column
represents an attribute of the record.
Extent: An extent is a set of contiguous data blocks allocated
for storing a specific type of information. When more space is
needed, additional extents are allocated.
Blocks: The smallest unit of storage in an Oracle database is
a block (also known as an Oracle data block). Data is stored in
these blocks, and each block can contain multiple rows of a
table.
Row Piece: A row piece is a part of a row. If a row is too large
to fit into a single block, it is divided into multiple row pieces and
stored in different blocks. Each row piece contains part of the
data for that row.

Database Block: Contents

Components of an Oracle Database Block


Block Header: The block header contains metadata about the
block itself. This includes information such as the block address,
the type of block, transaction information, and row directory.
The block header is located at the top of the block.
Free Space: Free space is the portion of the block that is
currently not used for storing row data. It is available for future
inserts and updates. Free space is typically located between
the block header and the row data, allowing the block to grow
as new data is added or existing rows are updated. The amount
of free space can vary over time as rows are inserted, updated,
or deleted.
Row Data: Row data is where the actual data for the rows in
the table is stored. Each row in the block occupies space, and
as more rows are added, this area grows. Row data is usually
located at the bottom of the block and grows upwards towards
the block header.

Tablespaces and Data Files


Tablespaces
Belong to Only One Database: A tablespace is a logical
storage unit within an Oracle database, and each
tablespace is associated with a single database. This
means that a tablespace cannot span multiple databases.
Consist of One or More Data Files: Each tablespace is
made up of one or more physical data files. These files are
where the actual data is stored on disk.
Divided into Logical Units of Storage: Within a
tablespace, data is organized into logical storage units
called segments, extents, and blocks.
Data Files
Belong to Only One Tablespace and One Database:
Each data file is associated with a single tablespace and,
consequently, with a single database. A data file cannot be
shared between multiple tablespaces or databases.
Repository for Schema Object Data: Data files store the
actual data for database objects (schema objects) such as
tables, indexes, and other database structures. The
logical storage structures within the tablespace (segments,
extents, and blocks) are mapped to physical storage
within these data files.

Space Management in Tablespaces


Locally Managed Tablespaces (LMT)
Free Extents Managed in the Tablespace: In locally
managed tablespaces, the management of free space is
done within the tablespace itself, rather than in the data
dictionary.
Bitmap Used to Record Free Extents: A bitmap is used
to track the allocation status of extents. Each bit in the
bitmap represents the status of a corresponding extent in
the tablespace.
Each Bit Corresponds to a Block or Group of Blocks:
The bitmap entries map to blocks or groups of blocks
within the tablespace. A bit value indicates whether the
extent is free or used.
Bit Value Indicates Free or Used Extents: If a bit is set
to one value (e.g., 0), it indicates that the extent is free. If
it is set to the other value (e.g., 1), it indicates that the
extent is used.
Recommendation: The use of locally managed
tablespaces is recommended over dictionary-managed
tablespaces due to their efficiency and reduced contention
on the data dictionary.
Dictionary-Managed Tablespaces (DMT)
Free Extents Managed by Oracle: In dictionary-
managed tablespaces, the Oracle database uses data
dictionary tables to keep track of free and used space.
This involves updating system tables whenever extents
are allocated or deallocated.
Updating Appropriate Tables: When extents are
allocated or unallocated, Oracle updates the appropriate
data dictionary tables to reflect these changes. This can
introduce overhead and contention as these tables are
accessed and updated.
Support for Backward Compatibility: Dictionary-
managed tablespaces are supported primarily for
backward compatibility with older versions of Oracle
databases. They are not recommended for new
databases because of their inefficiency compared to
locally managed tablespaces.

Oracle Managed Files (OMF)


Oracle Managed Files (OMF) simplify the management of
database files by automating the creation, naming, and deletion
of files.
Enlarging the Database
Adding a new tablespace to the database provides
additional storage for database objects such as tables and
indexes.
Expanding an existing tablespace by adding one or more
data files increases the storage capacity of that
tablespace.
Manually resizing an existing data file to increase its
storage capacity.
Configuring a data file to automatically increase in size as
needed, up to a specified maximum size. This is managed
using the AUTOEXTEND option.

ASM: Key Features and Benefits


Oracle ASM is a volume manager and a file system designed
to simplify the storage and management of Oracle database
files.
Stripes Files but Not Logical Volumes: ASM stripes
database files across all available disks in a disk group to
balance I/O load and improve performance. It does not
create traditional logical volumes but manages files at a
more granular level, enhancing performance and reliability.
Provides Online Disk Reconfiguration and Dynamic
Rebalancing: ASM allows for the addition or removal of
disks in a disk group while the database is online. It
dynamically rebalances data across all disks in the group
to ensure even distribution and optimal performance.
Allows for Adjustable Rebalancing Speed: The speed
of the rebalancing operation can be controlled using the
ASM_POWER_LIMIT parameter. This allows
administrators to balance the performance impact of
rebalancing with other workload requirements.
Provides Redundancy on a Per-File Basis: ASM
supports different levels of redundancy (normal, high, and
external) to protect against data loss. Redundancy is
managed at the file level, allowing for flexible and efficient
use of storage resources.
Supports Only Oracle Database Files: ASM is designed
specifically to manage Oracle database files, including
data files, control files, redo log files, and more. It does not
support general-purpose files.
Is Cluster Aware: ASM is fully integrated with Oracle Real
Application Clusters (RAC), providing a shared storage
infrastructure for databases in a clustered environment.
This ensures high availability and scalability.
Is Automatically Installed: ASM is installed as part of
the Oracle Grid Infrastructure installation, which simplifies
setup and ensures it is available for use with Oracle
databases.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy