GATE CS 2024 Set 2 — Question 26
MSQ+1 / -0MediumIndexing & File OrganizationDatabases
Databases → Indexing & File Organization
Last updated
Question
Which of the following file organizations is/are I/O efficient for the scan operation in DBMS?
A.
Sorted
B.
Heap
C.
Unclustered tree index
D.
Unclustered hash index
Correct answer
(A) Sorted; (B) Heap
Solution
A scan operation involves retrieving all records in the relation.(A) TRUE: In a Sorted file organization, records are stored sequentially. Scanning involves reading blocks contiguously, which is very I/O efficient.
(B) TRUE: In a Heap file organization, records are stored in data blocks without any specific order. Scanning simply requires reading all the data blocks sequentially, which is I/O efficient.
(C) FALSE: An Unclustered tree index stores pointers to data records. Scanning via the index requires traversing the leaf nodes and then fetching each record from the data file. Since the data file is not sorted by the index key, this leads to random I/O for every record, which is very inefficient.
(D) FALSE: An Unclustered hash index is designed for point queries. Scanning requires iterating through buckets and following pointers to data records, resulting in random I/O, which is inefficient.
(B) TRUE: In a Heap file organization, records are stored in data blocks without any specific order. Scanning simply requires reading all the data blocks sequentially, which is I/O efficient.
(C) FALSE: An Unclustered tree index stores pointers to data records. Scanning via the index requires traversing the leaf nodes and then fetching each record from the data file. Since the data file is not sorted by the index key, this leads to random I/O for every record, which is very inefficient.
(D) FALSE: An Unclustered hash index is designed for point queries. Scanning requires iterating through buckets and following pointers to data records, resulting in random I/O, which is inefficient.
More questions on Indexing & File Organization
2024 Set 2 Q19Once the DBMS informs the user that a transaction has been successfully completed, its effect…2024 Set 1 Q20Let S be the specification: "Instructors teach courses. Students register for courses. Courses are…2024 Set 2 Q20In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one…2024 Set 1 Q21In a tree, the requirement of at least half-full (50%) node occupancy is relaxed for which…2024 Set 1 Q22Which of the following statements about a relation in first normal form (1NF) is/are…
Practice GATE CS PYQs with adaptive difficulty
Timed practice, skill tracking, and AI explanations — free to start.
Start practicing free