Indexed Sequential Access Method (ISAM) is a method for creating, maintaining, and manipulating
computer file
A computer file is a System resource, resource for recording Data (computing), data on a Computer data storage, computer storage device, primarily identified by its filename. Just as words can be written on paper, so too can data be written to a ...
s of data so that records can be retrieved sequentially or randomly by one or more keys. Indexes of key fields are maintained to achieve fast retrieval of required file records in
indexed files.
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
originally developed ISAM for
mainframe computer
A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications like bulk data processing for tasks such as censuses, industry and consumer statistics, enterprise ...
s, but implementations are available for most computer systems.
The term ''ISAM'' is used for several related concepts:
*The IBM ISAM product and the
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
it employs.
*A
database
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
system where an application developer directly uses an
application programming interface
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
to search indexes in order to locate records in data files. In contrast, a
relational database
A relational database (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970.
A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
uses a
query optimizer which automatically selects indexes.
*An indexing algorithm that allows both sequential and keyed access to data. Most databases use some variation of the
B-tree
In computer science, a B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing fo ...
for this purpose, although the original IBM ISAM and
VSAM implementations did not do so.
*Most generally, any index for a database. Indexes are used by almost all databases.
Organization
In an ISAM system, data is organized into
records which are composed of fixed length fields, originally stored sequentially in key sequence. Secondary set(s) of records, known as ''indexes'', contain pointers to the location of each record, allowing individual records to be retrieved without having to search the entire data set. This differs from the contemporaneous
navigational databases, in which the pointers to other records were stored inside the records themselves. The key improvement in ISAM is that the indexes are small and can be searched quickly, possibly entirely in memory, thereby allowing the database to access only the records it needs. Additional modifications to the data do not require changes to other data, only the table and indexes in question.
When an ISAM file is created, index nodes are fixed, and their pointers do not change during inserts and deletes that occur later (only content of leaf nodes change afterwards). As a consequence of this, if inserts to some leaf node exceed the node's capacity, new records are stored in overflow chains. If there are many more inserts than deletions from a table, these overflow chains can gradually become very large, and this affects the time required for retrieval of a record.
[Ramakrishnan Raghu, Gehrke Johannes - Database Management Systems, McGraw-Hill Higher Education (2000), 2nd edition (en) page 252]
Relational database
A relational database (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970.
A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
s can easily be built on an ISAM framework with the addition of logic to maintain the validity of the links between the tables. Typically the field being used as the link, the ''
foreign key
A foreign key is a set of attributes in a table that refers to the primary key of another table, linking these two tables. In the context of relational databases, a foreign key is subject to an inclusion dependency constraint that the tuples ...
'', will be indexed for quick lookup. While this is slower than simply storing the pointer to the related data directly in the records, it also means that changes to the physical layout of the data do not require any updating of the pointers—the entry will still be valid.
ISAM is simple to understand and implement, as it primarily consists of direct access to a database file. The trade-off is that each client machine must manage its own connection to each file it accesses. This, in turn, leads to the possibility of conflicting inserts into those files, leading to an inconsistent database state. To prevent this, some ISAM implementations
provide whole-file or individual record
locking functionality. Locking multiple records runs the risk of
deadlock unless a
deadlock prevention scheme is strictly followed. The problems of locking, and deadlock are typically solved with the addition of a
client–server framework which marshals client requests and maintains ordering. Full
ACID
An acid is a molecule or ion capable of either donating a proton (i.e. Hydron, hydrogen cation, H+), known as a Brønsted–Lowry acid–base theory, Brønsted–Lowry acid, or forming a covalent bond with an electron pair, known as a Lewis ...
transaction management systems are provided by some ISAM client–server implementations.
These are the basic concepts behind a
database management system
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and an ...
(DBMS), which is a client layer over the underlying data store.
ISAM was replaced at IBM with a methodology called
VSAM (virtual storage access method). Still later, IBM developed
SQL/DS and then
Db2 which IBM promotes as their primary
database management system
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and an ...
. VSAM is the physical access method used in Db2.
OpenVMS
The
OpenVMS operating system uses the
Files-11 file system in conjunction with RMS (
Record Management Services). RMS provides an additional layer between the application and the files on disk that provides a consistent method of data organization and access across multiple 3GL and 4GL languages. RMS provides four different methods of accessing data; sequential, relative record number access, record file address access, and indexed access.
The indexed access method of reading or writing data only provides the desired outcome if in fact the file is organized as an ISAM file with the appropriate, previously defined keys. Access to data via the previously defined key(s) is extremely fast. Multiple keys, overlapping keys and key compression within the hash tables are supported. A utility to define/redefine keys in existing files is provided. Records can be deleted, although "garbage collection" is done via a separate utility.
Design considerations
IBM engineers designed the ISAM system to use a minimum amount of
computer memory
Computer memory stores information, such as data and programs, for immediate use in the computer. The term ''memory'' is often synonymous with the terms ''RAM,'' ''main memory,'' or ''primary storage.'' Archaic synonyms for main memory include ...
. The tradeoff was that the
Input/Output channel, control unit, and disk were kept busier. An ISAM file consists of a collection of data records and two or three levels of index. The ''track index'' contains the highest key for each
disk track on the
cylinder it indexes. The ''cylinder index'' stores the highest key on a cylinder, and the
disk address of the corresponding track index. An optional ''master index'', usually used only for large files, contains the highest key on a cylinder index track and the disk address of that cylinder index. Once a file is loaded data records are not moved; inserted records are placed into a separate ''overflow area''. To locate a record by key the indexes on disk are searched by a complex
self-modifying channel program.
This increased the busy time of the channel, control unit, and disk. With increased physical and virtual memory sizes in later systems this was seen as inefficient, and
VSAM was developed to alter the tradeoff between memory usage and disk activity.
ISAM's use of self-modifying channel programs later caused difficulties for
CP-67 support of
OS/360, since CP-67 copied an entire channel program into fixed memory when the I/O operation was started and translated virtual addresses to real addresses.
ISAM-style implementations
*
Advantage Database Server
Sap is a fluid transported in the xylem cells (vessel elements or tracheids) or phloem sieve tube elements of a plant. These cells transport water and nutrients throughout the plant.
Sap is distinct from latex, resin, or cell sap; it is a sep ...
database manager
*
Berkeley DB
*
Btrieve
*FairCom DB
*C-ISAM
*
DataFlex proprietary database
*
dBase and related products
Clipper and
Foxpro
*
Digital Equipment Corporation
Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president until ...
Record Management Services
*
Enscribe is the HP Tandem structured file access method
*
Extensible Storage Engine
*
Access Database Engine (ACE and formerly JET) used by
Microsoft Access
Microsoft Access is a database management system (DBMS) from Microsoft that combines the relational database, relational Access Database Engine (ACE) with a graphical user interface and software-development tools. It is a member of the Microsof ...
*
MySQL
MySQL () is an Open-source software, open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A rel ...
implements and extends ISAM as
MyISAM
*
Paradox
*pblIsam GPL implementation written in C
*
Superbase database family
*
dbm DBM and Flat File databases working in tandem
See also
*
Sequential access memory (SAM)
*
Virtual storage access method (VSAM)
*
Flat file
*
NoSQL
NoSQL (originally meaning "Not only SQL" or "non-relational") refers to a type of database design that stores and retrieves data differently from the traditional table-based structure of relational databases. Unlike relational databases, which ...
*
dbm
References
{{DEFAULTSORT:Isam
Computer file systems
Computer file formats
IBM software