Relative Files - Organization
Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4
5 6 7 325 326 327 328 Relative Record Number
Slide 9
Relative Files - Adding a Record
Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4
5 6 7 325 326 327 328 Relative Record Number Rec327
Slide 10
Relative Files - Adding a Record
Rec001freeRec003Rec004freefreeRec007Rec325Rec326Rec327Rec328 1 2 3
4 5 6 7 325 326 327 328 Relative Record Number Rec327
Slide 11
Relative Files - Deleting a Record
Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4
5 6 7 325 326 327 328 Relative Record Number Rec325
Slide 12
Relative Files - Deleting a Record
Rec001freeRec003Rec004freefreeRec007deleted/freeRec326freeRec328 1
2 3 4 5 6 7 325 326 327 328 Relative Record Number Rec325
Slide 13
Relative Files - Amending a Record
Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4
5 6 7 325 326 327 328 Relative Record Number Rec007
Slide 14
Relative Files - Amending a Record
Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4
5 6 7 325 326 327 328 Relative Record Number Rec007
Slide 15
Indexed Files - Organization H R Z L O R C F H T W Z Mi Nf Ni
Nt Oi Ot Index Records Data Records
Slide 16
Indexed Files - Reading Record Ni H R Z L O R C F H T W Z Mi Nf
Ni Nt Oi Ot Index Records Data Records
Slide 17
Indexed Files - Reading Record Ni H R Z L O R C F H T W Z Mi Nf
Ni Nt Oi Ot Index Records Data Records
Slide 18
Indexed Files - Reading Record Ni H R Z L O R C F H T W Z Mi Nf
Ni Nt Oi Ot Index Records Data Records
Slide 19
Sequential Files. Slow - when the hit rate is low. Complicated
to change (insert, delete, amend) Fast - when the hit rate is high.
Most storage efficient. Simple organization. Recovers space from
deleted records. Disadvantages. Advantages.
Slide 20
Relative Files. Wasteful of storage if the file is only
partially populated. Cannot recover space from deleted records.
Only a single, numeric key allowed. Keys must map on to the range
of the Relative Record numbers. Fastest Direct Access organization.
Very little storage overhead. Can be read sequentially.
Disadvantages. Advantages.
Slide 21
Indexed Files. Slowest Direct Access organization. Especially
slow when adding or deleting records. Not very storage efficient.
Must store the Index records, the alternate Index records, the data
records and the alternate data records. Can use multiple,
alphanumeric keys. Can have duplicate alternate keys. Can be read
sequentially on any of its keys. Can partially recover space from
deleted records. Disadvantages. Advantages.