SlideShare a Scribd company logo
1 of 9
PLACING FILE RECORDS
ON DISK
Shashwat Shriparv
dwivedishashwat@gmail.com
InfinitySoft
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.
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.
:
• 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.
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.
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
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.
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.
Shashwat Shriparv
dwivedishashwat@gmail.com
InfinitySoft

More Related Content

What's hot

file system in operating system
file system in operating systemfile system in operating system
file system in operating system
tittuajay
 
File Organization
File OrganizationFile Organization
File Organization
Manyi Man
 
10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
koolkampus
 

What's hot (20)

File organization
File organizationFile organization
File organization
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
Database System Architectures
Database System ArchitecturesDatabase System Architectures
Database System Architectures
 
Object Oriented Dbms
Object Oriented DbmsObject Oriented Dbms
Object Oriented Dbms
 
Indexing and Hashing
Indexing and HashingIndexing and Hashing
Indexing and Hashing
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
 
OODM-object oriented data model
OODM-object oriented data modelOODM-object oriented data model
OODM-object oriented data model
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Deadlock Prevention
Deadlock PreventionDeadlock Prevention
Deadlock Prevention
 
6 chapter 6 record storage and primary file organization
6 chapter 6  record storage and primary file organization6 chapter 6  record storage and primary file organization
6 chapter 6 record storage and primary file organization
 
File Organization
File OrganizationFile Organization
File Organization
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
File organisation
File organisationFile organisation
File organisation
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
DBMS - RAID
DBMS - RAIDDBMS - RAID
DBMS - RAID
 
10. XML in DBMS
10. XML in DBMS10. XML in DBMS
10. XML in DBMS
 
Operating system paging and segmentation
Operating system paging and segmentationOperating system paging and segmentation
Operating system paging and segmentation
 

Similar to File records on disk

AOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyondAOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyond
Zubair Nabi
 
File management
File managementFile management
File management
Mohd Arif
 

Similar to File records on disk (20)

Ch 17 disk storage, basic files structure, and hashing
Ch 17 disk storage, basic files structure, and hashingCh 17 disk storage, basic files structure, and hashing
Ch 17 disk storage, basic files structure, and hashing
 
Database management system File organization-sk.pdf
Database management system File organization-sk.pdfDatabase management system File organization-sk.pdf
Database management system File organization-sk.pdf
 
AOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyondAOS Lab 10: File system -- Inodes and beyond
AOS Lab 10: File system -- Inodes and beyond
 
File system interface
File system interfaceFile system interface
File system interface
 
File management
File managementFile management
File management
 
Chapter13
Chapter13Chapter13
Chapter13
 
Fundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of recordsFundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of records
 
Inverted index
Inverted indexInverted index
Inverted index
 
File System Implementation.pptx
File System Implementation.pptxFile System Implementation.pptx
File System Implementation.pptx
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya Jyothi
 
Chapter 3 Indexing.pdf
Chapter 3 Indexing.pdfChapter 3 Indexing.pdf
Chapter 3 Indexing.pdf
 
Chapter 3 Indexing Structure.pdf
Chapter 3 Indexing Structure.pdfChapter 3 Indexing Structure.pdf
Chapter 3 Indexing Structure.pdf
 
DFS-Lecture-6 (3).ppt
DFS-Lecture-6 (3).pptDFS-Lecture-6 (3).ppt
DFS-Lecture-6 (3).ppt
 
5 data storage_and_indexing
5 data storage_and_indexing5 data storage_and_indexing
5 data storage_and_indexing
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
File Types in Data Structure
File Types in Data StructureFile Types in Data Structure
File Types in Data Structure
 
File organization and indexing
File organization and indexingFile organization and indexing
File organization and indexing
 
3620121datastructures.ppt
3620121datastructures.ppt3620121datastructures.ppt
3620121datastructures.ppt
 
File System Interface
File System InterfaceFile System Interface
File System Interface
 
Operating system 4 files by adi
Operating system 4 files by adiOperating system 4 files by adi
Operating system 4 files by adi
 

More from Shashwat Shriparv

LibreOffice 7.3.pptx
LibreOffice 7.3.pptxLibreOffice 7.3.pptx
LibreOffice 7.3.pptx
Shashwat Shriparv
 

More from Shashwat Shriparv (20)

Learning Linux Series Administrator Commands.pptx
Learning Linux Series Administrator Commands.pptxLearning Linux Series Administrator Commands.pptx
Learning Linux Series Administrator Commands.pptx
 
LibreOffice 7.3.pptx
LibreOffice 7.3.pptxLibreOffice 7.3.pptx
LibreOffice 7.3.pptx
 
Kerberos Architecture.pptx
Kerberos Architecture.pptxKerberos Architecture.pptx
Kerberos Architecture.pptx
 
Suspending a Process in Linux.pptx
Suspending a Process in Linux.pptxSuspending a Process in Linux.pptx
Suspending a Process in Linux.pptx
 
Kerberos Architecture.pptx
Kerberos Architecture.pptxKerberos Architecture.pptx
Kerberos Architecture.pptx
 
Command Seperators.pptx
Command Seperators.pptxCommand Seperators.pptx
Command Seperators.pptx
 
Upgrading hadoop
Upgrading hadoopUpgrading hadoop
Upgrading hadoop
 
Hadoop migration and upgradation
Hadoop migration and upgradationHadoop migration and upgradation
Hadoop migration and upgradation
 
R language introduction
R language introductionR language introduction
R language introduction
 
Hive query optimization infinity
Hive query optimization infinityHive query optimization infinity
Hive query optimization infinity
 
H base introduction & development
H base introduction & developmentH base introduction & development
H base introduction & development
 
Hbase interact with shell
Hbase interact with shellHbase interact with shell
Hbase interact with shell
 
H base development
H base developmentH base development
H base development
 
Hbase
HbaseHbase
Hbase
 
H base
H baseH base
H base
 
My sql
My sqlMy sql
My sql
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
Introduction to apache hadoop
Introduction to apache hadoopIntroduction to apache hadoop
Introduction to apache hadoop
 
Next generation technology
Next generation technologyNext generation technology
Next generation technology
 

File records on disk

  • 1. PLACING FILE RECORDS ON DISK Shashwat Shriparv dwivedishashwat@gmail.com InfinitySoft
  • 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. 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. • 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. 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. 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. 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. 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.