Open In App

GATE | GATE CS 1999 | Question 25

Like Article
Like
Save
Share
Report

Which of the following is correct?
(A) B-trees are for storing data on disk and B+ trees are for main memory.
(B) Range queries are faster on B+ trees.
(C) B-trees are for primary indexes and B+ trees are for secondary indexes.
(D) The height of a B+ tree is independent of the number of records.


Answer: (B)

Explanation: Option (A) is False because both B-trees and B+ trees are for storing data on disk

Option (B) is True because By searching leaf level linearly in B+ tree, we can say a node is present or not in B+ tree. But for B tree we have to traverse the whole tree and Most of the database system use indexes built on some form of a B+ tree due to its many advantages, in particular its support for range queries. Leaf nodes are linked together in B+ tree. Hence range queries are faster.

Option (C) is False because B tree and B+ tree uses for dynamic multilevel indexes not for primary or secondary index.

Option (D) is False because Height depends on number of record as well as max no of keys in each node (i.e. order of tree) .

Quiz of this Question


Last Updated : 12 Oct, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads