There are various methods of storing and retrieving both data and ready information in computers from primary to secondary storage systems. Data may be stored in different storage devices in the computer. There are three basic methods used to retrieve data from computers;
Sequential Access Method
This method of data access is for example applied on reel type magnetic tapes. The data is stored in a logical sequence. The data that was stored first will appear first in the storage device. To find any specific file the device starts searching from the beginning and goes through all files till it finds the specified data.
For example in magnetic tapes the device has to rewind to the beginning each time a file is searched and look in sequence till it finds the specified one. The rewinding and searching makes sequential access devices practically slower.
Direct Access Method
In direct access method, the device can retrieve the required piece of data directly without the need of any sequence. Though data in direct access devices can be accessed sequentially but it is much slower that way. The devices are subdivided into various locations and each location is assigned an address. Each piece of data is stored in these addresses. When the computer is asked to search for a specific file, it searches for the assigned address of that file.
The address helps the computer go straight to specific data without having to go through every file in the storage devices. This is what makes direct access devices much faster than sequential devices.
Indexed File Access Method
Indexed access method can be described as a hybrid; it is a cross between sequential and direct access methods. Storage of the data in a device is done using sequential method. Each record is then assigned two codes a primary key and a secondary key.
The primary key is a type of identification code and appears first in the record name. It can for example be a social security number or any suitable identification format. It works as the locator number of that record. Primary keys are stored sequentially so that within a given block of data the specific records can be randomly stored. An index at the beginning of this block of data is used to identify all the records in it. After finding the index of the block of data the computer proceeds to find the primary key of the records.
The secondary key serves as the full identification of the record. It is used to exactly locate the specific item. The secondary key tells the computer specifically where the out of sequence item can be found.