VSAM Database Management System

VSAM Database Management System

VSAM Database Management System : ISAM was replaced at IBM with a methodology called VSAM (Virtual Storage Access Method). Still later, IBM developed DB2 which, as of 2004, IBM promotes as their primary database management System. VSAM is the physical access method used in DB2.

The major disadvantage of the index-sequential organization is that as the file grows, performance deteriorates rapidly because of overflows, and consequently there arises the need for periodic reorganization. Reorganization is an expensive process and the file becomes unavailable during reorganization. The virtual storage access method (VSAM) is IBM’s advanced version of the index-Sequential organization that avoids these disadvantages. The System is immune to the characteristics of the Storage medium, which could be considered as a pool of blocks.

The VSAM files are made up of two components: the index and data. However, unlike index-sequential organization, overflows are handled in a different manner. The VSAM index and data are assigned to distinct blocks of virtual storage called a control interval. To allow for growth, each time a data block overflows it is divided into two blocks and appropriate changes are made to the indexes to reflect this division. Indexing are maintained through B-Tree.

VSAM Database Management System

 

 

Indexing using B+ -Trees

B+-tree indices are an alternative to indexed-sequential files. AB “-tree is a rooted tree satisfying the following properties:

  • All paths from root to leafare of the same length.
  • Each node that is not a root or a leaf has between n/2 and n children.
  • A leaf node has between (n-1)/2) and n-1 values.

 

  • Special cases:
  • If the root is not a leaf, it has at least 2 children.
  • if the root is a leaf (that is, there are no other nodes in the tree), it can have between 0 and (n-1) values.

Advantages

  • Automatically reorganizes itself with small, local, changes, in the face of insertions and deletions. Reorganization of entire file is not required to maintain performance.
  • B+trees are used extensively.

Disadvantages

  • Performance degrades as file grows, since many overflow blocks get created. Periodic reorganization of entire file is required.
  • Extra insertion and deletion overhead, space overhead.

 

B+ -tree Node structure

VSAM Database Management System

  • Typical node
  • ki are the Search-key values
  • Pi, are pointers to children (for non-leaf nodes) or pointers to records or buckets of records (for leaf nodes).
  • The search-keys in a node are Ordered

K1 < K2 <K3 < … Kn- 1

 

Observation about B+ -tree

  • Since the inter-node connections are done by pointers, “logically” close blocks need not be “physically” close.
  • The non-leaf levels of the B-tree form a hierarchy of sparse indices.
  • The B+ -tree contains a relatively small number of levels (logarithmic in the size of the main file), thus searches can be conducted efficiently.
  • Insertions and deletions to the main file can be handled efficiently, as the index can be restructured in logarithmic time.

 

B+ -Tree File Organization

 

  • Index File Ddegradation problem is solved by using B+ -Tree indices. Data file degrdation problem is solved by using B+ -Tree File Organization.
  • leaf node is less than the number of pointers in a non leaf node.
  • Since records are larger thn pointers, the maximum number of records that can be stored in ┬áleaf node is less than the number of pointers in a nonleaf node.
  • Leaf nodes are still required to be half full.
  • Insertion and deletion are handled in the same way as insertion and deletion of entries in a B+”-tree index.

VSAM Database Management System

 

VSAM Database Management System