Difficulty: Easy
Correct Answer: should be chosen to match the data characteristics
Explanation:
Introduction / Context:
File record length impacts storage overhead, access speed, and flexibility. The right choice depends on the nature of the data, access patterns, and update behavior in databases, log files, and structured binary formats.
Given Data / Assumptions:
Concept / Approach:
There is no one-size-fits-all rule. Fixed-length records favor constant-time indexing and simple offsets; variable-length records reduce internal fragmentation for heterogeneous data. Designers weigh update frequency, typical record size distribution, and the need for direct addressing.
Step-by-Step Solution:
Verification / Alternative check:
Database storage engines (heap files, slotted pages) and log-structured systems adopt designs based on observed data distributions, confirming the adaptive approach.
Why Other Options Are Wrong:
Common Pitfalls:
Ignoring alignment and page size effects; neglecting update patterns that lead to fragmentation; overlooking the cost of pointers/offset tables for variable records.
Final Answer:
should be chosen to match the data characteristics
Discussion & Comments