Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Indexing & File OrganizationEasy
Q1. An index in a database is used to:
- A.Replace primary key usage
- B.Slow down query results
- C.Speed up data retrieval✓ Correct
- D.Increase storage redundancy
Explanation
An index provides a fast access path to rows in a table, speeding up data retrieval.
Report an error in this question
Indexing & File OrganizationEasy
Q2. A primary index is built on:
- A.An unordered file without sorting
- B.A foreign key only in the relation
- C.Any non-key attribute in the table
- D.The primary key of an ordered file✓ Correct
Explanation
A primary index is defined on the ordering key field of an ordered (sorted) file.
Report an error in this question
Indexing & File OrganizationEasy
Q3. A dense index has:
- A.An entry for every block in the data file
- B.Only one entry for the entire data file
- C.An entry for every record in the data file✓ Correct
- D.No entries at all in the index structure
Explanation
A dense index has one index entry for every record in the data file.
Report an error in this question
Indexing & File OrganizationEasy
Q4. A sparse index has:
- A.An entry for every individual record stored
- B.An entry for each block or group of records✓ Correct
- C.Entries only for deleted records in the file
- D.No entries at all in the entire index file
Explanation
A sparse index has index entries for only some records, typically one per data block.
Report an error in this question
Indexing & File OrganizationEasy
Q5. A B-tree is a:
- A.Linear list with sequential access
- B.Balanced search tree used for indexing✓ Correct
- C.Binary search tree with two children
- D.Unbalanced tree without constraints
Explanation
A B-tree is a balanced tree structure that maintains sorted data for efficient search, insertion, and deletion.
Report an error in this question
Indexing & File OrganizationEasy
Q6. In a B+ tree, all actual data pointers are stored in:
- A.All nodes equally
- B.Leaf nodes only✓ Correct
- C.Root node only
- D.Internal nodes only
Explanation
In a B+ tree, data pointers are stored only in leaf nodes; internal nodes contain only keys for navigation.
Report an error in this question
Indexing & File OrganizationEasy
Q7. Hashing is used for:
- A.Direct access to records using a hash function✓ Correct
- B.Sorting data into a specific order on columns
- C.Sequential access to all records in the file
- D.Creating views on top of the base table data
Explanation
Hashing computes a storage address directly from the key value using a hash function.
Report an error in this question
Indexing & File OrganizationEasy
Q8. A secondary index is built on:
- A.The ordering field of the file
- B.The primary key field only
- C.A non-ordering field of a file✓ Correct
- D.A foreign key field only
Explanation
A secondary index is created on a field that is not the ordering field of the file.
Report an error in this question
Indexing & File OrganizationEasy
Q9. A clustered index means:
- A.Data rows are stored randomly without any ordering
- B.Data rows are physically stored in the index order✓ Correct
- C.No physical ordering is implied by the index at all
- D.Multiple indexes exist on the same column of data
Explanation
A clustered index determines the physical order of data rows in a table.
Report an error in this question
Indexing & File OrganizationEasy
Q10. Which data structure is commonly used for implementing indexes?
- A.Linked list nodes
- B.Stack structure
- C.Queue structure
- D.B+ tree structure✓ Correct
Explanation
B+ trees are the most commonly used data structure for database index implementation.
Report an error in this question
Indexing & File OrganizationMedium
Q11. In a B+ tree of order n, an internal node can have at most:
- A.n+1 keys in the node
- B.n keys and n children
- C.n children and n-1 keys✓ Correct
- D.2n children in total
Explanation
A B+ tree of order n has at most n children (pointers) and n-1 keys in each internal node.
Report an error in this question
Indexing & File OrganizationMedium
Q12. The height of a B+ tree with n records and order p is approximately:
- A.p*log(n)
- B.n * p
- C.log_p(n)✓ Correct
- D.n / p
Explanation
The height is approximately log base p of n, where p is the order (fan-out) of the tree.
Report an error in this question
Indexing & File OrganizationMedium
Q13. Static hashing has which disadvantage?
- A.Fixed number of buckets may lead to overflow as data grows✓ Correct
- B.It requires B+ trees to function as the base structure
- C.It is too slow for any practical database use case at all
- D.It cannot handle any data stored in the database tables
Explanation
Static hashing uses a fixed number of buckets, leading to overflow chains when data grows.
Report an error in this question
Indexing & File OrganizationMedium
Q14. Extendible hashing handles growth by:
- A.Deleting old records to make room for new data entries
- B.Using a B+ tree instead of hashing for the index data
- C.Increasing the number of hash functions used for keys
- D.Doubling the directory and splitting buckets as needed✓ Correct
Explanation
Extendible hashing uses a directory that doubles in size and splits only the overflowing bucket.
Report an error in this question
Indexing & File OrganizationMedium
Q15. Linear hashing handles growth by:
- A.Using a fixed number of buckets without any changes
- B.Splitting all buckets simultaneously at the same time
- C.Splitting buckets in a linear order, one at a time✓ Correct
- D.Never splitting any buckets regardless of the load
Explanation
Linear hashing splits buckets one at a time in a predetermined linear order as the load increases.
Report an error in this question
Indexing & File OrganizationMedium
Q16. A composite index is an index on:
- A.A stored procedure reference
- B.Two or more columns combined✓ Correct
- C.A view of the base table data
- D.A single column of the table
Explanation
A composite (concatenated) index is built on a combination of two or more columns.
Report an error in this question
Indexing & File OrganizationMedium
Q17. A covering index is one that:
- A.Indexes all tables in the database regardless of whether they need indexing
- B.Has no columns included in it and serves no purpose for query optimization
- C.Covers only the primary key column and does not include any other attributes
- D.Contains all columns needed to satisfy a query without accessing the base table✓ Correct
Explanation
A covering index includes all columns referenced by a query, eliminating the need to access the actual table.
Report an error in this question
Indexing & File OrganizationMedium
Q18. A bitmap index is most efficient for:
- A.Primary key columns that uniquely identify each row
- B.Columns with unique values that never repeat at all
- C.Columns with high cardinality (many distinct values)
- D.Columns with low cardinality (few distinct values)✓ Correct
Explanation
Bitmap indexes work best for columns with few distinct values (e.g., gender, status) in data warehousing.
Report an error in this question
Indexing & File OrganizationMedium
Q19. An index-organized table (IOT) stores:
- A.Data separately from all index structures created
- B.Data only in memory without disk-based persistence
- C.Data directly in the index structure (B+ tree)✓ Correct
- D.Data in flat files without any indexing structures
Explanation
An IOT stores the entire row data within the B+ tree index structure, eliminating separate table storage.
Report an error in this question
Indexing & File OrganizationMedium
Q20. The term fan-out in a B+ tree refers to:
- A.The number of records stored in the entire data file
- B.The maximum number of pointers (children) in a node✓ Correct
- C.The number of leaf nodes at the bottom of the tree
- D.The total height of the tree from root to leaf level
Explanation
Fan-out is the maximum number of children (pointers) an internal node can have.
Report an error in this question
Indexing & File OrganizationHard
Q21. In a B+ tree, the minimum occupancy of internal nodes (non-root) is:
- A.All pointers must be full
- B.One pointer (child) as minimum
- C.Exactly n pointers at all times
- D.Ceiling of n/2 pointers (children)✓ Correct
Explanation
Non-root internal nodes must have at least ⌈n/2⌉ children (pointers), where n is the order.
Report an error in this question
Indexing & File OrganizationHard
Q22. The global depth in extendible hashing indicates:
- A.The total number of records stored across all the buckets
- B.The number of buckets currently allocated in the structure
- C.The number of bits used to determine the directory entry✓ Correct
- D.The number of hash functions used for the key computation
Explanation
Global depth is the number of bits of the hash value used to index into the directory.
Report an error in this question
Indexing & File OrganizationHard
Q23. Local depth in extendible hashing indicates:
- A.The depth of the B+ tree from the root node to the leaf node level
- B.The total number of collisions that have occurred in the hash table
- C.The number of bits used to determine which bucket a record belongs to✓ Correct
- D.The size of the directory that maps hash values to bucket addresses
Explanation
Local depth of a bucket indicates how many bits of the hash value are used to determine membership in that bucket.
Report an error in this question
Indexing & File OrganizationHard
Q24. A hash join in query processing works by:
- A.Partitioning both relations using the same hash function then joining matching partitions✓ Correct
- B.Using an index on the join attribute to look up matching tuples from the inner relation
- C.Sorting both relations on the join attribute first and then merging the sorted result sets
- D.Using nested loops where each tuple of one relation is compared with every tuple of other
Explanation
Hash join hashes both relations on the join attribute into partitions, then probes matching partitions.
Report an error in this question
Indexing & File OrganizationHard
Q25. R-trees are used to index:
- A.Text data and documents only
- B.Temporal data and timestamps
- C.One-dimensional key values only
- D.Spatial (multidimensional) data✓ Correct
Explanation
R-trees are specialized index structures for spatial data, using minimum bounding rectangles.
Report an error in this question
Indexing & File OrganizationHard
Q26. A function-based index is created on:
- A.A user role that defines access permissions and grants
- B.A database name used to identify the schema information
- C.A table name stored in the database system catalog data
- D.The result of a function applied to one or more columns✓ Correct
Explanation
A function-based index indexes the result of a function/expression on columns (e.g., UPPER(name)).
Report an error in this question
Indexing & File OrganizationHard
Q27. An inverted index is commonly used in:
- A.Foreign key enforcement
- B.Numerical computations only
- C.Primary key lookups only
- D.Full-text search engines✓ Correct
Explanation
An inverted index maps terms to the documents/records containing them, used extensively in text search.
Report an error in this question
Indexing & File OrganizationHard
Q28. The order of a B+ tree affects performance because:
- A.A higher order means more keys per node, reducing tree height and disk I/O✓ Correct
- B.A higher order always increases the tree height and requires more disk access
- C.Lower order is always better because smaller nodes fit in memory more easily
- D.Order has no effect on performance and does not change disk I/O requirements
Explanation
Higher order means more keys per node, resulting in a shorter tree and fewer disk accesses for searches.
Report an error in this question
Indexing & File OrganizationHard
Q29. Bulk loading a B+ tree is more efficient than individual insertions because:
- A.It creates an unbalanced tree that must be rebalanced later
- B.It sorts data first and builds the tree bottom-up, minimizing splits✓ Correct
- C.It skips creating the tree entirely and uses a flat file instead
- D.It uses no sorting and inserts records in their original order
Explanation
Bulk loading sorts records first, then builds the tree bottom-up, avoiding many individual insert operations and splits.
Report an error in this question
Indexing & File OrganizationHard
Q30. A skip list can be used as an alternative to B+ trees for indexing because:
- A.It provides O(log n) average search, insert, and delete with simpler implementation✓ Correct
- B.It uses less memory than any other data structure used for indexing purposes
- C.It is always faster than B+ trees for every type of database query and operation
- D.It requires no randomization and is fully deterministic in its performance
Explanation
Skip lists offer logarithmic average-case performance with a simpler implementation than balanced trees.
Report an error in this question