Difficulty: Easy
Correct Answer: a hashed file
Explanation:
Introduction / Context:
Different file organizations trade off access speed, maintenance cost, and storage overhead. Recognizing which design uses a mathematical transformation of keys directly into storage addresses is important for understanding performance characteristics and collision handling strategies.
Given Data / Assumptions:
Concept / Approach:
A hashed file uses a hash function h(key) to compute a bucket address. It provides near-constant-time access for exact-key lookups, assuming a good hash and manageable load factor. Tree files (for example, B-trees) and indexed files rely on ordered structures and pointers; sequential files store records in key order and require scanning or binary search on sorted media.
Step-by-Step Solution:
Identify the keyword “mathematical formula” transforming key → location.Match to hashing: h(key) → bucket/page address.Select “a hashed file.”
Verification / Alternative check:
Hashed organizations use primary area plus overflow chains for collisions; indexed organizations maintain separate index structures instead of direct key-to-address mapping.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming hashing is always faster: range queries perform poorly on hashed files because address computation destroys ordering. Also, poor hash functions lead to clustering and long overflow chains.
Final Answer:
a hashed file
Discussion & Comments