# 加州大学的B+树试题，大家看看谁能做出来

bary 2008-04-23 05:23:18
1. A disk block of size 1024 bytes is used to store a B+ tree node.
Block header size=10 bytes. The key length is 9 bytes.
Each pointer is 4 bytes.
What is the maximum order of the B+ tree.

2. Compute the lower and upper bounds of the height of a
B+ tree index of order-n on a file with m records.

3. For the following order-5 B+ tree show the number of block
access and the tree after each operation.
Insert key 13 and then delete key 43.

(Note: assume that each node is 1 block, and do not count data block
accesses. Include empty block access and return.)

___
|35 |
|___|
/ \
/ \
/ \
/ \
____________/ \ ______
| 10, 20 | |42,50 |
|____________| |______|
/ | \ / | \
_______/ ____|________ \_______ _______/ ___|___ \______
|5,6,7 | |10,11,12,14 | |20,22 | |35,36 | |42,43 | |50,52 |
|______| |____________| |______| |______| |______| |______|
...全文
102 5 点赞 打赏 收藏 举报

5 条回复

• 打赏
• 举报

baobao2010 2008-04-30
mark
• 打赏
• 举报

• 打赏
• 举报

mmmcd 2008-04-26
``````
___
¦35 ¦
¦___¦
/       \
/           \
/                \
/                    \
____________/                      \ ______
¦ 10,   20  ¦                       ¦42,50 ¦
¦___________¦                       ¦______¦
/      ¦         \                   /     ¦     \
_______/  ____ ¦________  \_______   _______/  ___ ¦___   \______
¦5,6,7 ¦  ¦10,11,12,14  ¦  ¦20,22 ¦  ¦35,36 ¦  ¦42,43 ¦   ¦50,52 ¦
¦______¦  ¦____________ ¦  ¦______¦  ¦______¦  ¦______¦   ¦______¦ ``````
• 打赏
• 举报

bary 2008-04-23
___
¦35 ¦
¦___¦
/ \
/ \
/ \
/ \
____________/ \ ______
¦ 10, 20 ¦ ¦42,50 ¦
¦___________¦ ¦______¦
/ ¦ \ / ¦ \
_______/ ____ ¦________ \_______ _______/ ___ ¦___ \______
¦5,6,7 ¦ ¦10,11,12,14 ¦ ¦20,22 ¦ |35,36 ¦ ¦42,43 ¦ ¦50,52 ¦
¦______¦ ¦____________ ¦ ¦______¦ ¦______¦ ¦______¦ ¦______¦
• 打赏
• 举报

3.2w+

2008-04-23 05:23