in Databases
15,484 views
45 votes
45 votes

B$^{+}$-trees are preferred to binary trees in databases because

  1. Disk capacities are greater than memory capacities
  2. Disk access is much slower than memory access
  3. Disk data transfer rates are much less than memory data transfer rates
  4. Disks are more reliable than memory
in Databases
15.5k views

3 Comments

Plz  explain option A???
1
1

@ sir, why option A not correct ?

My explanation:  since disks are larger in size hence we try to minimize the number of accesses by using B/B+ trees. Therefore option A should be correct. 

0
0
Aren’t both the options \((B)\) and \((C)\) synonymous?
1
1

4 Answers

51 votes
51 votes
Best answer

Answer is (B). The major advantage of $B+$ tree is in reducing the number of last level access which would be from disk in case of large data size. 

http://stackoverflow.com/questions/15485220/advantage-of-b-trees-over-bsts

edited by
by

4 Comments

Sir please answer this question.

The major advantage of B+ tree is in reducing the number of last level access which would be from disk in case of large data size. 

BST is balanced. In BST also we will access the disk only on the last level. Then how is B+ trees better than BST using this argument?

0
0
because B+ tree has order greater than 2 which reduces the height of tree significantly as compared to any binary tree, and search time is proportional to O(h)
13
13

@Arjun sir, since the disk access time is very much than that of memory access time and since we are having more locality of reference with B+Trees ,we will be having less reads from the hard disk where is in BST for each cache miss we are going to fetch it from hard disk for each single block..Is it reason we are preferring option B even though disk access time is slower than memory access time?? 

Correct me if I am wrong sir..

0
0
38 votes
38 votes

B+ Trees don't have data associated with interior nodes. More keys can fit on a page of a memory. Therefore, it will require fewer cache misses in order to access data that is on a leaf node.

Data in B+ Tree is stored in a way to make optimum use of locality of reference. And We know that Disk access time (ms) is much higher than memory Access time (ns), So, it takes more time to access a page from Disk, so We want to retrieve as much as data in one go. So, we use B+ Tree instead of BST.

by

1 comment

Data in B+ Tree is stored in a way to make optimum use of locality of reference.

@thor can you explain bit more about this

0
0
8 votes
8 votes

Binary trees can be skewed. B+ trees are balanced. In binary trees, in the worst case you get $O(n)$ search complexity, while the same for B+ trees is $O(logn)$

Each visit to a node in the tree is actually visiting a block in the Secondary Memory. Since Secondary Memory is slower, B+ trees would benefit us over Binary trees because of the reduction in our visits to the Secondary Memory.

Option B

–6 votes
–6 votes
d)

any other reasonable option is (a), but i chose reliability
Answer:

Related questions