...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 507
In a B tree of order m with p nodes the average number of splits is at most
A
1/⌈(m/2)⌉-1)
B
(⌈(m/2)⌉-1)
C
1/⌈m/2⌉
D
None
Question 507 Explanation: 
Leaf Nodes=p
keys=m
To split the node, assume that following the insertion of the new key, p has the format
m,A0,(K1,A1),…,(Km,Am), and Ki<ki+1, 1<=i<m
The node is split into two nodes, p and q, with the following formats:
node p: ⌈(m/2)⌉-1, A0(K1A1<`/sub>), …, (K⌈(m/2)⌉-1, A⌈(m/2)⌉-1)
node q: m-⌈(m/2)⌉, A⌈(m/2)⌉, (K⌈(m/2)⌉+1, A⌈(m/2)⌉+1), …, (Km,Am)
The remaining key, K⌈(m/2)⌉-1, and a pointer to the new node,q, from a tuple(K⌈(m/2)⌉,q).

→ This is to be inserted into the parent of p. Before attempting this the nodes p and q are written to disk.

</m
</k
Correct Answer: B
Question 507 Explanation: 
Leaf Nodes=p
keys=m
To split the node, assume that following the insertion of the new key, p has the format
m,A0,(K1,A1),…,(Km,Am), and Ki<ki+1, 1<=i<m
The node is split into two nodes, p and q, with the following formats:
node p: ⌈(m/2)⌉-1, A0(K1A1<`/sub>), …, (K⌈(m/2)⌉-1, A⌈(m/2)⌉-1)
node q: m-⌈(m/2)⌉, A⌈(m/2)⌉, (K⌈(m/2)⌉+1, A⌈(m/2)⌉+1), …, (Km,Am)
The remaining key, K⌈(m/2)⌉-1, and a pointer to the new node,q, from a tuple(K⌈(m/2)⌉,q).

→ This is to be inserted into the parent of p. Before attempting this the nodes p and q are written to disk.

</m
</k
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!