This presentation discusses database storage concepts in Oracle including blocks, extends, segments, and tablespaces. It defines each concept as follows:
Blocks are the smallest logical unit of storage in Oracle and represent a specific number of bytes on disk. Extents are collections of contiguous data blocks that make up segments. Segments store specific data structures like tables or indexes and are made up of one or more extents. Tablespaces logically store segments and physically store data in associated datafiles.
2. CONTENT
Introduction.
what are blocks?
what are extends?
what are segments?
what are tablespaces?
3. INTRODUCTION
Oracle allocates logical database space
for all data in a database.
The units of database space allocation
are data blocks, extents, and
segments.
Oracle stores data logically in
tablespaces and physically in datafiles
associated with the corresponding
tablespace.
4. BLOCKS
Data Blocks is smallest logical unit to store
Oracle Data.
One data block represent specific number of
bytes on physical hard disk.
Data Block size is usually multiple of operating
system block size
You can have multiple block sizes with in
single database (max. five).
Block Size is specified by initialization
parameter DB_BLOCK_SIZE
Data Block in Oracle is also called as logical
block
6. Header : contains generic information like
block address and type of segment (index,
data.)
Table Directory : contains information about
table having rows in that block
Row Directory : contains information about
actual row contained in that block
Free Space : available space in data block
for additional row or update of row which
require more space.
Row Data : contains table or index data.First
three component of data block (Header,
Table & Row directory) collectively known
as Overhead
7. EXTENDS
Extent is collection of contiguous data
blocks.
One or more extents make up a segment.
When the existing space in a segment is
completely used, Oracle allocates a new
extent for the segment.
8. When Extents Are
Allocated
When you create a table, Oracle allocates to the table's
data segment an initial extent of a specified number of
data blocks. Although no rows have been inserted yet,
the Oracle data blocks that correspond to the initial
extent are reserved for that table's rows.
If the data blocks of a segment's initial extent become
full and more space is required to hold new data, Oracle
automatically allocates an incremental extent for that
segment. An incremental extent is a subsequent extent
of the same or greater size than the previously allocated
extent in that segment.
For maintenance purposes, the header block of each
segment contains a directory of the extents in that
segment.
9. SEGMENTS
Segment is set of extents allocated for
specific data structure (like table or
index).
Various kind of segments are table,
index, cluster, rollback, temporary …
Important views for segments
are dba_segments, user_segments,all_se
gments
In a Segment, first block of first
extent contains segment
header information
10. Things to note w.r.t. Segment,
Extent & Datablocks
Segment and its associated extents are stored
in one table space.
Extents of a segment may not be contiguous on
disk
Segment can span multiple datafiles of a
particular tablespace (Information on
tablespace & datafiles coming soon) but extent
can contain data from only one datafile.
12. TABLESPACES
Tablespaces are the bridge between
certain physical and logical components of
the Oracle database. Tablespaces are
where you store Oracle database objects
such as tables, indexes and rollback
segments.
You can think of a tablespace like a
shared disk drive in Windows. You can
store files on your shared drive, move
files around and remove files. The same is
true with tablespaces.
13. PRESENTED BY :
• VINAY UGAVE (SDBCT,INDORE)
SUBMITTED TO:
MISS GARIMA JOSHI