Presentation on
   tablespaces
segments extends
    and blocks
CONTENT
   Introduction.
   what are blocks?
   what are extends?
   what are segments?
   what are tablespaces?
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.
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
Format of data block is
  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
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.
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.
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
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.
The Relationships Among Segments,
    Extents, and Data Blocks
  •
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. 
PRESENTED BY :

• VINAY UGAVE (SDBCT,INDORE)

               SUBMITTED TO:
               MISS GARIMA JOSHI
Presentation on tablespaceses segments extends and blocks

Presentation on tablespaceses segments extends and blocks

  • 1.
    Presentation on tablespaces segments extends and blocks
  • 2.
    CONTENT  Introduction.  what are blocks?  what are extends?  what are segments?  what are tablespaces?
  • 3.
    INTRODUCTION  Oracle allocateslogical 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 issmallest 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
  • 5.
  • 6.
      Header : containsgeneric 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 collectionof 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 setof 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 notew.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.
  • 11.
    The Relationships AmongSegments, Extents, and Data Blocks •
  • 12.
    TABLESPACES  Tablespaces arethe 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