cs4432 - week 4

45 flashcardsby alicia
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

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