File records on disk

1,257 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,257
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

File records on disk

  1. 1. PLACING FILE RECORDS ON DISK Shashwat Shriparv dwivedishashwat@gmail.com InfinitySoft
  2. 2. RECORD : It is the collection of related data values and items.It describes the entities and attributes. eg : Employee record . RECORD TYPES : It is the collection of field names and their corresponding data types. A data type specifies the types of values of a field.
  3. 3. FILE: It is a sequence of records. There are two types of files depending upon the size 1. Fixed length record 2. Variable length record Fixed length record : Every record in a file are same size. Variable length record : Different records in a file are different size. :
  4. 4. • File become variable length record depends 1.The file records are same record type but one or more fields are different size. 2. File records are same record type but one or more field have multiple values for individual record. 3. Files are same record type but some fields are optional. 4. Files contain records of different record types and varying length.
  5. 5. RECORD BLOCKS • Records of file are stored in disk blocks.Each block contain numerous records. bfr = floor (B/R) records per block. unused space = B-(bfr*R)bytes where bfr is the blocking factor. B is the size of block b. R is the size of fixed length records.
  6. 6. SPANNED Vs UNSPANNED Spanned : It stores one part of a record in one block and the rest in the other . Unspanned : The records are not allow to cross block boundries. Each block may contain different number of records. number of blocks for r records b = ceil (r/bfr)blocks
  7. 7. ALLOCATING FILE BLOCKS ON DISK There are three types allocation 1. Contiguous allocation 2. Linked allocation 3. Indexed allocation Contiguous allocation The file blocks are allocated to consecutive disk blocks. Linked allocation Each file block contain a pointer to the next block. Indexed allocation One or more index blocks contain pointes to the actual blocks.
  8. 8. FILE HEADER • It contain information about a file that is needed by the system programs that access the file records. • It also include the information to determine the disk address,record format of a file.
  9. 9. Shashwat Shriparv dwivedishashwat@gmail.com InfinitySoft

×