next up previous
Next: Variable-Length Records Up: File Organization Previous: File Organization

Fixed-Length Records

  1. Consider a file of deposit records of the form:

     aaaaaaaaaaaa¯type deposit = record
    

    bname : char(22);

    account# : char(10);

    balance : real;

    end

  2. When a record is deleted, we could move all successive records up one (Figure 10.7), which may require moving a lot of records.
  3. So one solution is:
  4. Note: Use of pointers requires careful programming. If a record pointed to is moved or deleted, and that pointer is not corrected, the pointer becomes a dangling pointer. Records pointed to are called pinned.
  5. Fixed-length file insertions and deletions are relatively simple because ``one size fits all''. For variable length, this is not the case.


next up previous
Next: Variable-Length Records Up: File Organization Previous: File Organization

Osmar Zaiane
Tue Jul 7 16:00:21 PDT 1998