File organization and access methods MCQs

By: Prof. Dr. Fazal Rehman Shamil | Last updated: September 23, 2024

  1. Which file organization method ensures that records are stored in a sequence based on a key field?A. Heap File Organization
    B. Sequential File Organization
    C. Hash File Organization
    D. Clustered File Organization
    Answer: B. Sequential File Organization
  2. What is the primary purpose of an index in a database?A. To store data sequentially
    B. To improve query performance
    C. To reduce data redundancy
    D. To increase data security
    Answer: B. To improve query performance
  3. In which file organization method are records stored randomly on the disk?A. Heap File Organization
    B. Sequential File Organization
    C. Hash File Organization
    D. Clustered File Organization
    Answer: A. Heap File Organization
  4. Which of the following is a characteristic of hash file organization?A. Records are stored sequentially
    B. Records are accessed directly using a hash function
    C. Records are stored in sorted order
    D. Records are stored in clusters
    Answer: B. Records are accessed directly using a hash function
  5. What type of index stores pointers to the actual data records in the database?A. Dense Index
    B. Sparse Index
    C. Primary Index
    D. Secondary Index
    Answer: A. Dense Index
  6. Which access method is used to retrieve records sequentially from a file?A. Random Access
    B. Sequential Access
    C. Direct Access
    D. Hash Access
    Answer: B. Sequential Access
  7. In which file organization method are related records stored together in the same disk block?A. Heap File Organization
    B. Sequential File Organization
    C. Hash File Organization
    D. Clustered File Organization
    Answer: D. Clustered File Organization
  8. Which type of index is created on non-primary key columns to speed up query performance?A. Primary Index
    B. Secondary Index
    C. Clustered Index
    D. Sparse Index
    Answer: B. Secondary Index
  9. What is the main advantage of using a clustered index?A. It uses less disk space
    B. It stores data in a non-sorted order
    C. It speeds up data retrieval by keeping related data close together
    D. It eliminates the need for a primary key
    Answer: C. It speeds up data retrieval by keeping related data close together
  10. In a B-tree index, what is the term for the lowest level where actual data records are stored?A. Root Node
    B. Leaf Node
    C. Internal Node
    D. Branch Node
    Answer: B. Leaf Node
  11. Which file organization method uses a hash function to compute the address of the record?A. Heap File Organization
    B. Sequential File Organization
    C. Hash File Organization
    D. Clustered File Organization
    Answer: C. Hash File Organization
  12. What is the benefit of using a dense index over a sparse index?A. Less storage space is required
    B. Faster retrieval of records
    C. Easier to update
    D. Supports only primary keys
    Answer: B. Faster retrieval of records
  13. Which file organization method is most efficient for range queries?A. Heap File Organization
    B. Sequential File Organization
    C. Hash File Organization
    D. Clustered File Organization
    Answer: B. Sequential File Organization
  14. In the context of indexing, what does the term ‘fan-out’ refer to?A. The number of records indexed
    B. The number of index levels
    C. The number of children of a node in a B-tree
    D. The size of the index file
    Answer: C. The number of children of a node in a B-tree
  15. Which access method allows records to be read in any order without regard to their physical sequence?A. Sequential Access
    B. Random Access
    C. Direct Access
    D. Hash Access
    Answer: B. Random Access