You are on page 1of 2

Direct all comments to Greg A. Nixon: gn1324@bristol.ac.

uk
SEQND.D!" 1#2
$conce%t&D'Greg A. Nixon$#conce%t&D'$conce%t&D'"om%uting$#conce%t&D'
Se(uential )s an*om Access +e.g. &n ,ables-
This concept is related to computer file systems and data storage
1
.
Sequential and Random access are both methods of data retrieval which
work in entirely different ways.
To illustrate the principles of this subject I shall describe a situation in
which both methods of data retrieval can be used.
o n address book is a prime e!ample of a database to which this
concept can be applied.
o The address book can either be stored in a set order "e.g. sorted
by name# or not ordered at all.
o This is where the distinction between the two methods occurs.
Sequential ccess$
The ordered address book could be accessed by sequential access. This
works by loading the entire address book into memory and keeping it in
memory while it is being looked at.
%hen you have finished looking at or editing the address book for new
entries or revised addresses& all of the records in the are written back onto
the disk.
If a new record is added to the address book& the database has to be
resorted.
Sequential ccess is always faster than Random ccess. This is because
the disk head
'
reads one bit of data on the disk after another.
Random ccess$
If the address book is not ordered& then random access can be used for
looking at and editing the contents. %hen the file is used& only the desired
records are loaded into memory. t the end of a session& only the changes
or additions to the database are written to disk.
ll of the records in the file must be of uniform length so that the computer
can access any record anywhere in the database without having to
previously load it into memory.
The computer keeps track of where all the files are& "alphabetically#& by
creating an inde! which could be as simple as$
()& *& '& 1+, where ) is the first file "alphabetically#& *& the second
and so on.
In this case the disk head has to jump around the disk to locate the
pertinent bits of data& slowing the access speed down.
Direct all comments to Greg A. Nixon: gn1324@bristol.ac.uk
SEQND.D!" 2#2
$conce%t&D'Greg A. Nixon$#conce%t&D'$conce%t&D'"om%uting$#conce%t&D'
-otivations for .sing /ach Type of ccess$
The way these types of data access work can be illustrated through the
event of a computer crash.
%hen a sequential access database crashes& all the data will be lost 0
unless you have a backup
1
of that file& all information stored on that file will
be useless.
%hen a random access database crashes& only the data in the current
record will be lost. The rest of the database will remain intact.
Random access therefore prevents total data loss.
1owever& due to more frequent disk access used by this method&
the computer may be more likely to crash in the long term.
2oth methods need to be weighed to determine whether frequent
crashes would be more inconvenient than total data loss.
%hen working with a large database& one would be wiser to use random
access& to minimise the possibility of total data loss.
3or smaller databases where quicker access is needed& the sequential
method of retrieving data is best.
1
"om%uter *ata storage . /ar* *isk *ri)es an* e(ui)alent.
2
Disk 0ea* . t/e mec/anical %art o1 t/e /ar* *isk t/at mo)es across t/e sur1ace o1
t/e *isk to retrie)e in1ormation 1rom *i11erent %arts o1 t/e *isk.
1
2acku% 3 anot/er 1ile 4/ic/ contains exactl5 t/e same in1ormation as t/e
original.

You might also like