Files - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Files

Description:

Files [Computing] Serial Files Records are added (appended) to the end of the file as they occur. Sequential File The records are stored in sorted order of a key field. – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 9
Provided by: pete3371
Category:
Tags: files

less

Transcript and Presenter's Notes

Title: Files


1
Files
  • Computing

2
Serial Files
  • Records are added (appended) to the end of the
    file as they occur.

3
Sequential File
  • The records are stored in sorted order of a key
    field.

4
Random Access File
  • Each record has a key field.
  • A calculation is performed on the key field
    (hashing algorithm) which results in an address
    (hash address).
  • The record is stored at the hash address.

5
  • Example A file of members of a chess club.
  • Each member has a 4-digit membership number. This
    is the key field.
  • Hashing algorithm Subtract 1000 from the
    membership number.
  • Member John Smith has Membership Number 1004.
  • His record would be stored at record 4 in the
    file.


6
Serial (sequential) Access
  • Each record in a file is input until the required
    record is found.

7
Random (direct) Access
  • The hashing algorithm is performed on the
    keyfield of the required record, giving
  • a hash address where the record can be found.

8
  • In the Chess Club example, where would the record
    of Sally Jones (membership number 1006) be found?
  • Hashing algorithm Subtract 1000 from the
    membership number.


Record 6
Write a Comment
User Comments (0)
About PowerShow.com