File Organisation Flashcards

1
Q

List the hierarchy of data in a file.

A
1 Bit = 1 or 0 (binary digit)
1 Byte = 8 bits
1 Field = Many bytes
1 Record = Many fields
1 File = Many records
1 Database = Many files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the organisational format and access speed of 3 types of File organisation.

A

Serial:

Organisation: No Order
Access Speed: Slow

Sequencial:

Organisation: In order (often by primary key field).
Access Speed: Slightly faster (but still slow).

Direct:

Organisation: Various
Access Speed: A damn lot faster!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe how you would find a record in a serial file.

A

Just look through each record until you find the record required, or you reach the end of the file (and haven’t found it).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe how you wound find a record in a sequential file.

A

Start at beginning, look through each record until:

  • you find the record that matches,
  • you find a record with a key higher than the one you are looking for.
  • you reach the end of the file.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe how you would delete a record in a sequential or serial file.

A

Simply copy all records apart from the one you want to delete from the Old File (Father) to a New File (Son).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

State how you add a new record to a serial file.

A

Just store it at the end of the file, after the last record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe how you would add a new record into a sequential file.

A

Simply copy all records up to the insertion point, from the Old File (Father) to a New File (Son), write the new record to the new file, then copy the rest of the Old File over.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain the process of updating a master file from at unsorted serial file.

A

I will fill this in!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe, giving a reason, a situation where it would be more suitable to use direct (random) access files instead of indexed sequential.

A

Much faster to find and edit records in a random order, especially in large files. This would be suitable for editing sales records for customers, as they need to be updated in a unpredictable order (as sales come in).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe what happens when a hashing algorithm allocates a record to a storage location already occupied, and what happens when you want to access it later.

A

Store it in next available space or goes to next space in overflow area.

To find it, if the record is not found in the original location, check the following records until next available record, or search linearly through overflow area.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly