File Organization-Revision
File Organization-Revision
Revision
2
Revision
• Differentiate between the physical file and the logical file.
• Physical file: a collection of bytes stored on a disk or tape.
• Logical file: an “interface" that allows the application programs to access the physical
file on the secondary storage.
3
Revision
• What is the file structure? What factors are considered in designing the file
structure?
• A File Structures a combination of representations for data in files and of operations for
accessing the data. The factors that are considered in designing the file structure are:
1. Excepted and worst case response times
2. Excepted and worst case update times
3. I/O access requirements
4. Availability of required support
5. Storage space requirements
6. Complexity of required support
7. Maintenance requirements.
4
Revision
• Why study file structure design?
• Fast access to great capacity
• Reduce the number of disk accesses
• By collecting data into buffers, blocks or buckets
• Manage growth by splitting these collections
5
Revision
• What are metrics used to measure efficiency and effectiveness of a file structure ?
• Metrics used to measure efficiency and effectiveness of a file structure:
• simplicity,
• reliability,
• time complexities,
• space complexities,
• scalability,
• programmability, and
• maintainability.
6
Revision
• List three factors that affect portability in files.
• Factors affecting portability of files:
• Differences among Operating Systems
• Differences among Languages
• Differences in Machine Architectures
7
Revision
• What is redundancy reduction? Why is run-length encoding an example of
redundancy reduction?
• Data compression goal is to reduce redundancy, leaving only the informational content.
8
Revision
• Define the term “parity bit” and its types for nine track tapes?
• A parity bit, also referred to as parity check, is an extra bit added to a set of binary
data bits for the purpose of error detection during data transmission.
• Two types:
1. Even parity: In an even parity system, the parity bit is set to either 1 or 0 so that the
total number of 1-bits, including the parity bit, becomes an even number.
2. Odd parity: In an odd parity system, the parity bit is set to either 1 or 0 so that the total
number of 1-bits, including the parity bit, becomes an odd number.
9
Revision
• What is an index? Why do we need indexes? What type of index key are used?
• Indexing is a data structure technique which allows you to quickly retrieve data records
from a file.
• Types:
• Primary indexes
• Clustering indexes
• Secondary indexes
• Multilevel indexes
• Dynamic Indexes, B-Trees, B+-Trees
10