In file organization, what does an inverted list (inverted file) do, and how is it characterized in terms of indexing and key types?

Difficulty: Easy

Correct Answer: Uses an index for each key type

Explanation:


Introduction / Context:
An inverted list (or inverted file) is a classic access method that accelerates retrieval by maintaining separate indexes for different search keys or attributes. It is widely used for text retrieval and multi-key querying where single-key sequential organization is inadequate.


Given Data / Assumptions:

  • We compare common file organizations: sequential, indexed sequential, hashed, and inverted.
  • The focus is on how inverted files handle multiple keys.
  • We assume standard definitions from information retrieval and file systems.


Concept / Approach:
An inverted file stores postings lists mapping each key value to the set of record locations that contain it. Because each attribute of interest has its own index, queries on any indexed attribute are fast, even if the base records are stored in a different physical order.


Step-by-Step Solution:
1) Identify the access need: search by many attributes, not only the primary key.2) Provide an index per attribute or key type (e.g., customer_name, city, product_code).3) Maintain postings that point to record identifiers.4) Answer queries by intersecting or uniting postings lists.


Verification / Alternative check:
Text search engines demonstrate inverted indexes for every term, which generalizes to multiple key types in structured data contexts.


Why Other Options Are Wrong:
Contiguous blocks by a key: describes basic sequential or clustered storage.Sequential with single index: closer to indexed-sequential, not inverted.Random placement: characteristic of hashing, not inverted files.None of the above: incorrect because multiple per-key indexes define inverted files.


Common Pitfalls:
Confusing inverted files with single-key B-tree indexes; inverted files intentionally maintain many indexes, trading write overhead for query flexibility.


Final Answer:
Uses an index for each key type

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion