1. What is the difference between a data file and a program file?
A program contains instructions to be executed by a processor. A
data file contains information that is to be processed. For instance
Adobe Photoshop is a program and a picture file called school.jpg is a
data file.
2. What is a record?
A row in a database table.
3. What is a field?
A column in a database table.
4. What is an item?
The value in a field of a record. For instance the value 05-322433 might
be stored in the IC field of a persons record in a database table.
5. Modern database terms include row, column and tuples.
What do these terms mean?
A row in a table is contains all the information about one entity in a
database table. For instance, there will be one row for each person in a
persons database table.
6. What are two advantages of using permanent storage to store
files?
Permanent storage is non-volatile – this means that data stored in
this way is available for many years into the future. We use hard disks
for permanent storage and tapes when we want to archive important
information.
7. What is a variable length field?
Most modern databases have variable length fields. We set the maximum
size of a field when we design a table. But this does not mean that all
the possible space is used up when a record is added to a table. For
instance, we may set the width of a name field to 100. But when we add a
record with name "Nazree" to the database then we have only added 6
bytes to the size of the database instead of 100 bytes.
8. What is a fixed length field?
Some databases still use fixed length fields. In this case when "Nazree"
is added to the database as described in the question above we would
find that 100 bytes is added to the size of the database even though
9. What is serial access?
Serial access means that records are accessed in sequence, one after
the other. To see what is in record 1000, you would need to read the 999
records before it first.
10. What is random access?
This means we can access data directly. We can go directly to a
record without having to look at any other records first. Terms related
to this include hashing algorithms, index files and binary trees. These
are techniques used to organize files so that records can be located
rapidly.
11. How does a computer know where a variable length field ends?
The end of a record is identified by a special character called a
field end marker. The program can recognize this character as the end of
a variable length field.
12. What is a transaction file?
This is a list of transactions. In a business this might be a list
of sales for the day. At the end of the day the transaction file is
merged with a master file to update such information as shop stock
levels and year to date sales totals. One way of thinking of a
transaction is that it represents a change to a database. A single
transaction can mean changes to several tables in a database table.
13. What does interactive mean?
This means that the computer and the user have a dialog. When the
user does something it triggers a response that has been programmed into
the computer application.
14. What are reasons for choosing different methods of access?
Immediate access is necessary when a response without delay is required.
It would be sensible to have random access storage of account
information when a PIN number for a cashflow card is to be verified
while a customer is using an ATM machine. It would be silly to have the
customer wait for several hours for their PIN to be verified because all
the account information is stored on a high capacity serial access tape.
We do not need random access to backups and we do not need random access
to very small databases (such as shopping lists). In both these cases
serial access is a more sensible choice since it is considerably easier
to deal with from a programming point of view.