Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Direct Access Files.. Sequential Files - Adding a Record Rec085 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325^Z Ordered Rec001Rec005Rec045Rec090Rec100Rec150Rec300Rec325^Z.

Similar presentations


Presentation on theme: "Introduction to Direct Access Files.. Sequential Files - Adding a Record Rec085 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325^Z Ordered Rec001Rec005Rec045Rec090Rec100Rec150Rec300Rec325^Z."— Presentation transcript:

1 Introduction to Direct Access Files.

2 Sequential Files - Adding a Record Rec085 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325^Z Ordered Rec001Rec005Rec045Rec090Rec100Rec150Rec300Rec325^Z Unordered

3 Rec085 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325Rec085^Z New-Ordered Rec001Rec005Rec045Rec085Rec090Rec100Rec150Rec300Rec325^Z Extend-Unordered

4 Sequential Files - Deleting a Record Rec150 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325^Z Ordered Rec001Rec005Rec045Rec090Rec100Rec150Rec300Rec325^Z Unordered

5 Rec150 Rec300Rec005Rec090Rec045Rec100Rec001Rec325^Z New-Ordered Rec001Rec005Rec045Rec090Rec100Rec300Rec325^Z New-Unordered

6 Sequential Files - Amending a Record Rec045 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325^Z Ordered Rec001Rec005Rec045Rec090Rec100Rec150Rec300Rec325^Z Unordered

7 Rec045 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325^Z New-Ordered Rec001Rec005Rec045Rec090Rec100Rec150Rec300Rec325^Z New-Unordered

8 Relative Files - Organization Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4 5 6 7 325 326 327 328 Relative Record Number

9 Relative Files - Adding a Record Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4 5 6 7 325 326 327 328 Relative Record Number Rec327

10 Relative Files - Adding a Record Rec001freeRec003Rec004freefreeRec007Rec325Rec326Rec327Rec328 1 2 3 4 5 6 7 325 326 327 328 Relative Record Number Rec327

11 Relative Files - Deleting a Record Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4 5 6 7 325 326 327 328 Relative Record Number Rec325

12 Relative Files - Deleting a Record Rec001freeRec003Rec004freefreeRec007deleted/freeRec326freeRec328 1 2 3 4 5 6 7 325 326 327 328 Relative Record Number Rec325

13 Relative Files - Amending a Record Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4 5 6 7 325 326 327 328 Relative Record Number Rec007

14 Relative Files - Amending a Record Rec001freeRec003Rec004freefreeRec007Rec325Rec326freeRec328 1 2 3 4 5 6 7 325 326 327 328 Relative Record Number Rec007

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

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

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

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

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.

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.

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.


Download ppt "Introduction to Direct Access Files.. Sequential Files - Adding a Record Rec085 Rec300Rec150Rec005Rec090Rec045Rec100Rec001Rec325^Z Ordered Rec001Rec005Rec045Rec090Rec100Rec150Rec300Rec325^Z."

Similar presentations


Ads by Google