A sequential file is a file that contains and stores data in chronological order. The data itself may be ordered or un-ordered within the file. Unlike a random-access file, sequential files must be read from the beginning, and up to the location of the desired data. Sequential files are often stored on sequential access devices, like a magnetic tape.
The following example writes 10 records to a sequential file called FriendsData. The data is entered by the user and entered into different categories in an array such as 'FirstName', 'Surname', 'Email Address', and 'Mobile Number. The code then moves to 'next i' which is the next position in the array,
Relative organised files can be accessed sequentially in the same way that sequentially organised files can be accessed. The processing which can be performed on the sequentially organised files can also be performed on relatively organised files. However, relatively organised files have the advantage that they can also be accessed randomly, that is, a specified numbered record can be accessed in a relative file. The random access to records allows relative files to be accessed faster than sequential files.
Courses.p2pu.org. (2018). P2PU | HSC SDD - Planning and designing software solutions | Algorithm - Relative and sequential files. [online] Available at: https://courses.p2pu.org/en/courses/2544/content/5300/ [Accessed 21 Oct. 2018].
Supportline.microfocus.com. (2018). File Organizations. [online] Available at: https://supportline.microfocus.com/documentation/books/nx50/fhorgs.htm [Accessed 21 Oct. 2018].