recategorized
10,125 views
5 votes
5 votes

in a file which contains $1$ million records and the order of the tree is $100$, then what is the maximum number of nodes to be accessed if $B$+ tree index is used?

  1. $5$
  2. $4$
  3. $3$
  4. $10$
recategorized

3 Answers

Best answer
29 votes
29 votes

We need to find the maximum no. of nodes to be accessed so consider the minimum fill factor.

Here,order of b+tree= #ptrs per node=p=100

Mini. ptrs per node=$\left \lceil \frac{p}{2} \right \rceil$=50

#Nodes in last level=106/50 = 2 * 104

#Nodes in Second last level= 2*104/50 =400

#Nodes in Third last level= 400/50 =8

#Nodes in Forth last level= 8/50 =1

The maximum no. of nodes to be accessed = #B+ tree levels = 4 Ans(b)

selected by
9 votes
9 votes

ANSWER: B

B+- Trees

  • If there are K search-key values in the file, the path is no longer than ⎡ log⎡n/2⎤ (K)⎤. 
  •  With 1 million search key values and n = 100, at most log50(1,000,000) = 4 nodes are accessed in a lookup.
  •  Contrast this with a balanced binary tree with 1 million search key values — around 20 nodes are accessed in a lookup
edited by
1 votes
1 votes

Option C)

last level will contain 1000000/100=10000 nodes

second last level 10000/100=100 nodes

and root node 100/100=1 node

hence max number of node need to be acessed =3

Answer:

Related questions

3 votes
3 votes
3 answers
1
Arjun asked Apr 22, 2018
3,646 views
Considering the following table in a relational database : $$\begin{array}{|c|c|c|c|} \hline \textbf{Last Name} & \textbf{Rank} & \textbf{Room} & \textbf{shift} \\ \hline...