ISAM

Index Sequential Access Method ( ISAM ) is allowing a late 1960s developed by IBM access method for the records in a file that contains both ( sorted ) sequential and random (random) index- based access.

A file can have several different indices. Each index defines a different sequence of records, depending on which information is sought. For example, a customer file alphabetically by last name or numerically by zip code are sorted, where such indexes exist.

The index sequential access method that is also used in database systems use allows to optimize access speed depending on the task. Since the first standards of COBOL 1970 ISAM is in the file-control - paragraph rudimentary part of the standard COBOL language. A very early development of ISAM, also from IBM, but not standardized, Virtual Storage Access Method ( VSAM ) is.

Memory structure

The records are grouped into blocks or pages. A simple index refers to the lowest key of a data block of the main file, which is sorted in ascending order. A simple, single-stage index file is composed of index entries that refer to data blocks of the main file. In general, the index is a plurality of stages, wherein the index levels are in turn organized index sequentially.

  • Search in an ISAM file: the key in the index file until it is found or search sequentially the index is greater than the searched key. In the second case, in a multistage index now known, on which the index page of the searched key can be. There, the search process is also correspondingly until the key is found or not found.
  • Paste: First Search, then check if the new set fits on the page. Insert if yes sorted, if not insert new record on the next page or overflow page and update index pages.
  • Delete: First Search, then set marked as deleted. If it was the first sentence of the page or the page is now blank, adjust index pages.

A disadvantage of the ISAM file organization can be seen from the insert and delete operation. The main file and the index are static, new sentences are often stored in overflow blocks and thereby search operations are slower. Rapidly growing or changing files should be time-consuming regularly reorganized.

Method 2

The above method was not used very long. Succession was a method which was based on a tree / leaf structure. This made it possible to determine by a few comparisons, where was searched the record or should be inserted.

Structure of the key of the Isam file (index).

************************************************** *************** * LEAVES NO * FATHER * ************************************************** *************** ** * JOURNAL CONTENTS ( KEY) * ** ************************************************** *************** * LEFT RIGHT SON * SON * ************************************************** *************** First entry at the beginning of the file ( root ).

Example COBOL

The picture shows the file-control paragraph for an ISAM file a modern COBOL compiler:

  • SELECT ... ASSIGN TO: Assignment of External File Name to internal file name
  • WITH COMPRESSION | WITH ENCRYPTION: optional compression and encryption
  • ORGANIZATION IS INDEXED
  • ACCESS MODE IS SEQUENTIAL | RANDOM | DYNAMIC: alternatively one of the three access methods. Sequentially, via index, or both, that is, times sequentially by index, from this starting point and vice versa.
  • RECORD KEY IS key- name [= seg -name ... ] [WITH [ NO] DUPLICATES ] ] ...: the (primary) key can consist of more segments, ie individual fields of the record exist, duplicate keys can be allowed. The fields, of which only parts can be used as a (partial) index are - as usual in COBOL - to be defined in the FILE DESCRIPTION.
  • ALTERNATE RECORD KEY IS ...: more indexes can be defined.
  • LOCK MODE IS EXCLUSIVE | AUTOMATIC | MANUAL ...:
  • RESERVE { number} ALTERNATE AREA:
  • COLLATING SEQUENCE IS alphabet -name:

ISAM today

" ISAM files are still used today, namely always when the use of a relational database is not really worth ( amount of data, structure, performance, costs, etc. ). " There is still more data is probably stored in ISAM files as in relational databases. This is not just about data from COBOL environments, but especially under UNIX has on UNIX systems found by the realization of Informix C-ISAM index- sequential access method in the transition from mainframes widely available. Building on ISAM MyISAM also the database system has been developed, implemented, among others, in the widely used database management system MySQL. In addition, the Extensible Storage Engine based (ESE - also known as JET Blue) by Microsoft ISAM. The ESE is ( e), for example, as a database for Microsoft Active Directory and Exchange.

411242
de