BORING EDUCATION — LIVE EXPERIMENTProduct is live. Experiments are running. Feedback is being collected. Improvements are underway.Welcome to Boring Education. We're glad you're here while we're figuring out how to make learning better.
BORINGEDUCATION

1.2aFree

Records, files, and the three jobs a file can do

Your guide: Miss HiraExplains computers with chai, cricket and your phone.

The problem

A bank keeps one card per employee: number, name, grade, designation, joining date, qualification. Today three things change: one promotion, one retirement, one new hire. Where do you write the changes, and what if the main cards get damaged mid-update?

The traditional file system answers with three kinds of file: a master file for the latest data, a transaction file for today's changes, and a backup file for safety.

A record is a collection of related fields treated as a single unit. A file, or data set, is a collection of related records treated as a single unit. Files are grouped by usage, by function, and by how they are organized on storage.

Step 1 / 7

Notes, short questions and MCQs

Read the full notes: key terms, model answers and MCQs with answers

The problem

A bank keeps one card per employee: number, name, grade, designation, joining date, qualification. Today three things change: one promotion, one retirement, one new hire. Where do you write the changes, and what if the main cards get damaged mid-update?

The traditional file system answers with three kinds of file: a master file for the latest data, a transaction file for today's changes, and a backup file for safety.

A record is a collection of related fields treated as a single unit. A file, or data set, is a collection of related records treated as a single unit. Files are grouped by usage, by function, and by how they are organized on storage.

Key terms

Master file
The latest updated file, which never becomes empty once created. It holds information that stays constant for a long time and is updated by adding, deleting or editing records.
Transaction file
Records data before it is processed. It may be temporary, kept only until the master file is updated, or kept as a permanent record of transactions.
Backup file
A permanent file made with software utilities to protect an organization's vital files and data.
File extension
The part after the dot in a file name, usually given by the software at first save. It tells program files (.exe) from data files (.doc, .xls, .mdb).

Short questions with model answers

  1. Q1. Define field, record and file using the bank employee example.

    • Field: Employee Name = Madiha Jaffery
    • Record: all fields of employee 0001
    • File: records 0001, 0002, 0003, 0004 …

    Field ⊂ record ⊂ file

  2. Q2. Name the file type (usage point of view): (a) all students' admission data, (b) today's fee payments not yet posted, (c) a safety copy on another disk.

    • (a) master file
    • (b) transaction file
    • (c) backup file

    master · transaction · backup

  3. Q3. Classify (functional point of view): result.xls, setup.exe, clients.mdb, lecture.mpg.

    • setup.exe → program file
    • result.xls → worksheet; clients.mdb → database; lecture.mpg → video

    1 program file, 3 data files

Common mistakes

  • ✗ Calling one employee's details a file.

    ✓ One employee's fields form a record. A file is the collection of all such related records.

  • ✗ Saying a backup file stores data before it is processed.

    ✓ That is the transaction file. A backup file is a protective copy of vital files.

  • ✗ Writing that .com is the extension of source program files.

    ✓ The book prints this, but .com and .exe are both executable files. Source files use the language's extension, such as .c or .cpp.

MCQs

  1. 1. A collection of related fields treated as a single unit is a:

    1. (a) file
    2. (b) record
    3. (c) database
    4. (d) field
    Show answer

    (b) Related fields about one thing make a record; related records make a file.

  2. 2. Which file may be temporary?

    1. (a) master file
    2. (b) transaction file
    3. (c) backup file
    4. (d) none of these
    Show answer

    (b) A transaction file may be kept only until the master file is updated.

  3. 3. The master file is updated by:

    1. (a) adding records only
    2. (b) adding, deleting or editing records
    3. (c) emptying it daily
    4. (d) renaming it
    Show answer

    (b) The book lists three methods of updating: adding, deleting and editing records.

  4. 4. A file named clients.mdb is a:

    1. (a) program file
    2. (b) database data file
    3. (c) video file
    4. (d) text file
    Show answer

    (b) .dat, .dbf and .mdb are database data files.

  5. 5. Which extension belongs to an audio file?

    1. (a) .gif
    2. (b) .wav
    3. (c) .avi
    4. (d) .rtf
    Show answer

    (b) Audio files: .wav and .mid. .gif is an image, .avi a video, .rtf a document.

Quick revision

  • Field → record → file: related fields make a record, related records make a file (data set).
  • Usage view: master (latest, never empty), transaction (before processing), backup (protection).
  • Functional view: file name + extension; program files (.exe) and data files such as .doc, .xls and .mdb.