CS FundamentalsHardProduct-company MCQ pattern
How many of the following statements about indexing are correct? 1. A B+ tree stores data pointers only in its leaves, which are linked for range scans. 2. A B-tree may store data pointers in internal nodes too, so a search can end above the leaf level. 3. A hash index supports range queries such as salary BETWEEN 40000 AND 60000 efficiently. 4. A table can have several clustered indexes as long as they are on different columns.
- A. Only one
- B. Only two
- C. Only three
- D. All four
Correct answer: B. Only two
Only 1 and 2 are correct. 3 is false: hashing scatters neighbouring keys, so it only helps equality lookups; range queries need an ordered structure like a B+ tree. 4 is false: rows can be physically ordered only one way, so there is at most one clustered index.
More DBMS and SQL questions
- A relation is in 2NF, but a non-key attribute depends on another non-key attribute (a transitive dependency on the key). Which normal form…
- Which SQL command removes a table completely — its rows, its structure and its definition in the catalogue?
- Table Orders(id, cust, city, amount) rows: (1, 'Ana', 'Pune', 500), (2, 'Ben', 'Delhi', NULL), (3, 'Ana', 'Pune', 300), (4, 'Chen'…
- Table Orders(id, cust, city, amount) rows: (1, 'Ana', 'Pune', 500), (2, 'Ben', 'Delhi', NULL), (3, 'Ana', 'Pune', 300), (4, 'Chen'…
- Table Orders(id, cust, city, amount) rows: (1, 'Ana', 'Pune', 500), (2, 'Ben', 'Delhi', NULL), (3, 'Ana', 'Pune', 300), (4, 'Chen'…
- Transaction T1 reads a row, transaction T2 then updates that row and commits, and T1 reads the same row again and sees a different value…