File Organization
o The File is a collection of records. Using the primary key, we can
access the records. The type and frequency of access can be determined
by the type of file organization which was used for a given set of
records.
o File organization is a logical relationship among various records. This
method defines how file records are mapped onto disk blocks.
o File organization is used to describe the way in which the records are
stored in terms of blocks, and the blocks are placed on the storage
medium.
o The first approach to map the database to the file is to use the several
files and store only one fixed length record in any given file. An
alternative approach is to structure our files so that we can contain
multiple lengths for records.
o Files of fixed length records are easier to implement than the files of
variable length records.
Objective of file organization
o It contains an optimal selection of records, i.e., records can be selected
as fast as possible.
o To perform insert, delete or update transaction on the records should be
quick and easy.
o The duplicate records cannot be induced as a result of insert, update or
delete.
o For the minimal cost of storage, records should be stored efficiently.
Types of file organization:
File organization contains various methods. These particular methods have
pros and cons on the basis of access or selection. In the file organization, the
programmer decides the best-suited file organization method according to his
requirement.
,Types of file organization are as follows:
o Sequential file organization
o Heap file organization
o Hash file organization
o B+ file organization
o Indexed sequential access method (ISAM)
o Cluster file organization
o Indexed sequential access method
(ISAM)
o ISAM method is an advanced sequential file organization. In this
method, records are stored in the file using the primary key. An index
value is generated for each primary key and mapped with the record.
This index contains the address of the record in the file.
, o
If any record has to be retrieved based on its index value, then the address of
the data block is fetched and the record is retrieved from the memory.
Pros of ISAM:
o In this method, each record has the address of its data block, searching
a record in a huge database is quick and easy.
o This method supports range retrieval and partial retrieval of records.
Since the index is based on the primary key values, we can retrieve the
data for the given range of value. In the same way, the partial value can
also be easily searched, i.e., the student name starting with 'JA' can be
easily searched.
Cons of ISAM
o This method requires extra space in the disk to store the index value.
o When the new records are inserted, then these files have to be
reconstructed to maintain the sequence.
o The File is a collection of records. Using the primary key, we can
access the records. The type and frequency of access can be determined
by the type of file organization which was used for a given set of
records.
o File organization is a logical relationship among various records. This
method defines how file records are mapped onto disk blocks.
o File organization is used to describe the way in which the records are
stored in terms of blocks, and the blocks are placed on the storage
medium.
o The first approach to map the database to the file is to use the several
files and store only one fixed length record in any given file. An
alternative approach is to structure our files so that we can contain
multiple lengths for records.
o Files of fixed length records are easier to implement than the files of
variable length records.
Objective of file organization
o It contains an optimal selection of records, i.e., records can be selected
as fast as possible.
o To perform insert, delete or update transaction on the records should be
quick and easy.
o The duplicate records cannot be induced as a result of insert, update or
delete.
o For the minimal cost of storage, records should be stored efficiently.
Types of file organization:
File organization contains various methods. These particular methods have
pros and cons on the basis of access or selection. In the file organization, the
programmer decides the best-suited file organization method according to his
requirement.
,Types of file organization are as follows:
o Sequential file organization
o Heap file organization
o Hash file organization
o B+ file organization
o Indexed sequential access method (ISAM)
o Cluster file organization
o Indexed sequential access method
(ISAM)
o ISAM method is an advanced sequential file organization. In this
method, records are stored in the file using the primary key. An index
value is generated for each primary key and mapped with the record.
This index contains the address of the record in the file.
, o
If any record has to be retrieved based on its index value, then the address of
the data block is fetched and the record is retrieved from the memory.
Pros of ISAM:
o In this method, each record has the address of its data block, searching
a record in a huge database is quick and easy.
o This method supports range retrieval and partial retrieval of records.
Since the index is based on the primary key values, we can retrieve the
data for the given range of value. In the same way, the partial value can
also be easily searched, i.e., the student name starting with 'JA' can be
easily searched.
Cons of ISAM
o This method requires extra space in the disk to store the index value.
o When the new records are inserted, then these files have to be
reconstructed to maintain the sequence.