0% found this document useful (0 votes)
193 views5 pages

Computer Studies Assignment - 3x: File Access Methods

The document discusses different file access methods including sequential access, index-sequential access, and direct access. It also discusses file organization methods like sequential, index-sequential, and random. Finally, it covers topics like translators, compilers, assemblers, and differences between low-level and high-level languages.

Uploaded by

Agrippa Mungazi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views5 pages

Computer Studies Assignment - 3x: File Access Methods

The document discusses different file access methods including sequential access, index-sequential access, and direct access. It also discusses file organization methods like sequential, index-sequential, and random. Finally, it covers topics like translators, compilers, assemblers, and differences between low-level and high-level languages.

Uploaded by

Agrippa Mungazi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Computer studies

assignment -3x
File access methods
1. Sequential access
A simple access method, information in a file is accessed sequentially
one record after another.
To process the record all the 1-1 records previous to 1 must be
accessed

2. Index-sequential access
This access is a slight modification of the direct access method. it is a
combination of both the sequential access and the direct access.
The main concept is to access a file direct first and then sequential
from that point onwards.
This access method involves maintaining an index- thus a pointer to
block.

3. Direct access
Information present in a record of a file is to be accessed only if some key
value in that present in a record of a file is to be accessed only if some key value
in that record is known .
In those cases direct access is used.
It is based on the disk that is direct access device and allows random access of
any file block

FILE ORGANISATION
The process that involves how data is stored in file access and as
quickly as possible. three main ways of file organisation of:

a) Sequential
b) Index-sequential
c) Random
1. Sequential file organisation

All records are stored in sort of order ascending, descending,


alphabetical order is based on a field in the record. For example a file
holding a record employees ld, date of birth, address. It can be used
both direct access.
2. Index-sequential organisation
The records is stores in some order but there is a second file called the
index .file that indicate where exactly certain key points. Can not be
used with sequential access method . random file organisation .the
records are stored randomly but each record has its own specific
position on the disk address with this method no time could be wasted
searching for a file.

TRANSLATORS
INTERPRETES

It is also a translator, but instead of translating the source program to a


target program, it interprets each source instruction and produces the
results e.g the multiplication result {as opposed to the target
instruction to compute the multiplication result, which is what a
complier would produce}. There is no saved translation or target
program, only the results of the computations. This assumes that as the
interpreter is analyzing the source program it can produce the
appropriate binary code for the voltages that direct the operation of the
hardware components.

COMPLIES
It also translates a program from a high level language to, usually, low
level machines instructions. The translated program can be saved and
executed at a later time.

ASSEMBLERS
When using assembly language you will have to use an assembler .the
assembler will take the assembly code and convert it into the
corresponding machine code 1s and 0s(actually current flowing and
current off)
There is a one correspondence between a single assembly language
instruction and a machine code instruction in general there would be
one machine code produced per line of assembly language. This
translation or conversion is called assembling and is perfected by a

piece of software called an assembler before execution of the code can


take place.

Difference between complier and interpreter


An interpreter is faster than a complier because it has fewer stages
e.g no optimization stage; and it produces the results of the
computations as it translates the source instructions. An interpreter is
also simpler than a complier, but the computations specified in the
source program are carried less efficiently.
A complier is more complicated than an interpreter, simply because it
has more stages for doing analysis and optimizations, and because it
focuses on the translation of the entire program {whereas an
interpreter works on one instruction as a time }. However the resulting
target program translation is more efficient when it is executed.

Programming concepts
In this module we will be looking at imperative languages that execute
one line after the another.
1. Strings (characters)
Are a collection of single block characters
2. Booleans
Are variables that are like on/off switches and can only equal one
of two values .
3. Character
The character data type is a single character
4. Real
Is a more advanced number system than integer allowing for
rational and irrational numbers, decimal places and negatives

Low Level Language-second generation


In a low level programmer controls and specifies how to handle
the data , where to store it how to access it and assembly is said
to be a low level language .here is a source extract to print Hello
World to the screen.

Machine Language-first generation


The 1s and 0s that a computer can understand and execute.

High level language


High level programming language are terms used to describe
towards the comparison made. Assembly is considered a low level
and a machine is considered a high level language.

Difference between low level language and


high level language
A complier translates a program from a high level language to,
usually, low level machine instructions. The translated program
can be saved and executed at a later time. Note also that the
translated program is much larger than the source program. This
is because the source program is at a higher level and the target
program is at a lower level. For example, a high level operation
might be to multiply while a low level operation involves
manipulation of binary bits. Suppose your computer hardware
only has a binary adder; the high level multiply instruction would
have to be translated into computations that perform
multiplication by manipulating bits and using the adder . One
multiply instruction might be translated into up to ten or more
machine instructions.

d)

You might also like