35 votes 35 votes Which of the following is correct? B-trees are for storing data on disk and B$^+$ trees are for main memory. Range queries are faster on B$^+$ trees. B-trees are for primary indexes and B$^+$ trees are for secondary indexes. The height of a B$^+$ tree is independent of the number of records. Databases gate1999 databases b-tree normal + – Kathleen asked Sep 23, 2014 Kathleen 14.3k views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply vikas commented Jan 27, 2018 reply Follow Share how option d is incorrect ? i think it also true 0 votes 0 votes palashbehra5 commented Nov 5, 2021 reply Follow Share vikas, “independent” of the number of “records”? the very thing we are trying to structure? 0 votes 0 votes rhl commented May 27, 2023 reply Follow Share @vikas i think height B+ Tree depends on order of it. 0 votes 0 votes Gajanan Purud commented Sep 15, 2023 reply Follow Share B 0 votes 0 votes Please log in or register to add a comment.
Best answer 56 votes 56 votes False. Both r stored in disk True. 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 False. $B$ tree and $B^+$ tree uses dynamic multilevel indexes http://home.iitj.ac.in/~ramana/ch10-storage-2.pdf False. Height depends on number of record and also max no of keys in each node (order of tree) Correct Answer: $B$ srestha answered Sep 10, 2015 edited May 19, 2019 by Naveen Kumar 3 srestha comment Share Follow See all 13 Comments See all 13 13 Comments reply Show 10 previous comments rohith1001 commented Oct 16, 2019 reply Follow Share I guess the statement made by @Gate Fever is wrong. B+ trees are how data is organized in the hard disk. Hard disks are logically divided into blocks and each time we need to search for a key (or perform any operation for that matter) we will have to load the complete block to the main memory (RAM). By organizing data as B+ trees in the hard disk we will reduce the number of blocks loaded to the main memory. I found this from wikipedia. A B+tree is thus particularly useful as a database system index, where the data typically resides on disk, as it allows the B+tree to actually provide an efficient structure for housing the data itself (this is described in[4]:238 as index structure "Alternative 1"). Source: Wiki (Hard disks are available in TBs (Eg: 1TB HDD etc) but RAMs are available in only GBs (Eg: 4GB RAM, 8GB RAM). Without B+ trees searching a huge database would have taken days. :P) 1 votes 1 votes rish-18 commented Jan 31, 2021 reply Follow Share @srestha carnegie mellon school of cs slides http://www.cs.cmu.edu/afs/cs/academic/class/15721-f01/www/lectures/CC_Btrees.pdf Page no.1, slide(rectangle 5) – “B-Trees can be used for primary/secondary, or clustering/non-clustering index.” 1 votes 1 votes abir_banerjee commented Sep 20, 2022 reply Follow Share @GateAspirant999 "A B+-tree can have less levels (or higher capacity of search values) than the corresponding B-tree". This statement is true because we don’t have record pointers at internal nodes so space is saved in each block for storing more data values . That’s why height of B+ tree is less for the same number of nodes in a B tree. 0 votes 0 votes Please log in or register to add a comment.
10 votes 10 votes The leaves (the bottom-most index blocks) of the B+ tree are often linked to one another in a linked list; this makes range queries or an (ordered) iteration through the blocks simpler and more efficient (though the aforementioned upper bound can be achieved even without this addition). This does not substantially increase space consumption or maintenance on the tree. This illustrates one of the significant advantages of a B+tree over a B-tree; in a B-tree, since not all keys are present in the leaves, such an ordered linked list cannot be constructed. read @ implementation http://en.wikipedia.org/wiki/B%2B_tree Mithlesh Upadhyay answered Mar 17, 2015 reshown Mar 17, 2016 by srestha Mithlesh Upadhyay comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Option B is true Leaf nodes are linked together in B+trees hence range queries are faster. Gajanan Purud answered Sep 15, 2023 Gajanan Purud comment Share Follow See all 0 reply Please log in or register to add a comment.