1.1 The Heart of the file structure Design
File : A data structure on secondary storage which acts as a non-volatile
container for data. File is a name given to any kind of document stored in
any type of storage device which can be read by the computer. A file is
identified by a name followed by a filename extension.
File Structure : A pattern for arranging data in a file. It is a combination of representations
for data in files and of operations for accessing the data.
Primary Goals for Design of File Structures and Algorithms :
1) Minimize the number of disk accesses.
Problems and Concerns:
container for data. File is a name given to any kind of document stored in
any type of storage device which can be read by the computer. A file is
identified by a name followed by a filename extension.
File Structure : A pattern for arranging data in a file. It is a combination of representations
for data in files and of operations for accessing the data.
Primary Goals for Design of File Structures and Algorithms :
1) Minimize the number of disk accesses.
- If possible, transfer all information needed in one access.
- Group related information physically so it can be accessed together.
- Use compression techniques wherever possible
- Apply defragmentation procedures
- Avoid data redundancy
Problems and Concerns:
- File data is frequently dynamic - that is, it changes from time to time.
- Designing file structures for changes adds complexity.
- Typical file sizes are growing.
- Solutions which work for small files may be inadequate for large files.
- File structures, algorithms, and data structures must work together.