7.1.2+&+7.1.3+Sequential+file+organization

=**__Sequential File Organization__**=
 * Originally, sequential files were developed for magnetic tapes
 * Sequential files are similar to serial files, however, the data is sorted using key fields in sequential files.
 * Entries in a sequential file are ordered. This organization is fixed and usually cannot be changed without rewriting the whole file.
 * To update sequential files, they have to be stored in the primary memory entirely and then sorted/updated there, before being written back onto the tape/disk.

From IBM: "After you have placed a record into a sequential file, you cannot shorten, lengthen, or delete the record. However, you can update a record if the length does not change. New records are added at the end of the file." [|IBM Website]

Records are not organized by a specific pattern. To retrieve an entry, the file has to be scanned, starting at the beginning. At some point you should find the required record.
 * __7.1.2 - Unordered Records__**

For example:
 * RecordC ||
 * RecordG ||
 * RecordB ||
 * RecordA ||
 * RecordH ||
 * RecordE ||
 * RecordF ||
 * RecordD ||

Records are organized according to a certain key field. This enables one to apply batch updates/deletes, for example. However, when writing a new entry to the file, it can't simply be added to the end of the file. It has to be put into the right spot in the file. If this is not at the end then the whole file has to be read into the main memory, rearranged and finally written back to a new file with the new entry included.
 * __7.1.3 - Ordered Records__**

Example of an ordered sequential list:
 * RecordA ||
 * RecordB ||
 * RecordC ||
 * RecordD ||
 * RecordE ||
 * RecordF ||
 * RecordG ||
 * RecordH ||

Last modified by: Jocbe Last update: 6. September 2011

Sources:
 * Jones, Richard. __Computer Science Java Enabled.__ Victoria: IBID Press, 2004.
 * IBM help database: http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=/com.ibm.aix.cbl.doc/cpfio05.htm
 * PPP on processing sequential files: http://haryanto.staff.gunadarma.ac.id/Downloads/files/4034/6-SEQFILE2.PPT
 * Word document on serial and sequential files: http://www.exploreinfo.net/G12/Serial%20and%20Sequential%20files.doc