1What is a B-tree?
a disk based multi level balanced tree index structure
2What does each node in a B-tree represent?
a disk page
3What is the structure of a B-tree?
one root internal nodes and leaf nodes
4Where do all searches start in a B-tree?
at the root
5How does traversal work in a B-tree?
move down one level at a time
6What is a key property of B-trees?
all leaf nodes are at the same height
7Why are B-trees balanced?
to ensure efficient search insertion and deletion
8What is stored in each B-tree node?
n keys and n plus 1 pointers
9How are keys arranged in a node?
sorted left to right
10What is the minimum occupancy of a node?
at least 50 percent full
11What is special about the root node?
can have minimum one key and two pointers
12How many pointers does a node have relative to keys?
keys plus one pointers
13What is a B+ tree?
a self balancing ordered tree optimized for database indexing
14What is the time complexity of B+ tree operations?
o log n
15What is the main difference between B-tree and B+ tree?
b plus tree stores data only in leaf nodes
16What do internal nodes store in a B+ tree?
only keys for navigation
17What do leaf nodes store in a B+ tree?
actual data or record pointers
18Why are B+ trees good for range queries?
leaf nodes are linked sequentially
19What are two ways to store leaf node values?
record ids or full tuple data
20What must secondary indexes store in leaf nodes?
record ids
21What is equality search in a B-tree?
finding records with exact key value
22How does equality search work?
traverse from root to leaf then find key
23What is range search in a B-tree?
finding all keys within a range
24What is the first step in B-tree insertion?
find correct leaf node
25What happens if there is space in the leaf?
insert directly
26What happens if the leaf is full?
split the leaf node
27How are entries distributed after split?
evenly between two nodes
28What happens to the middle key in a leaf split?
copied up to parent
29What happens to the middle key in internal node split?
pushed up to parent
30Can splitting propagate upward?
yes recursively
31What happens if the root splits?
tree height increases
32What does splitting guarantee?
nodes remain at least 50 percent full
33What is the first step in deletion?
find leaf and remove entry
34When is deletion simple?
when node remains at least half full
35What happens if node underflows?
try redistribution from sibling
36What is redistribution?
borrowing entries from sibling node
37What if redistribution fails?
merge nodes
38What happens after merge?
delete separator key from parent
39Can merge propagate upward?
yes may reduce tree height
40Why avoid empty space in nodes?
nodes must stay compact except at end
41Why are B-trees efficient?
small height leads to few disk i o operations
42How many levels do B-trees usually have?
about 3 to 4 levels
43Why is root often fast to access?
it can be cached in memory
44What determines B-tree capacity?
node size keys and pointer sizes
45Why are B-trees used in databases?
efficient searching insertion deletion and range queries