Download presentation
Presentation is loading. Please wait.
1
1
2
What problems we would have during: Insertion Deletion Update 2
3
What would we do for record insertion? Find a block with enough empty space Get a new block But what would happen if we should insert the record in a specific block? 3 Offset Table Unused Record 4 Record 3 Record 2 Record 1
4
There are two possibilities: 1. There is enough room in the target block 2. There is not enough room in the target block In the 1 st case, insert and update the offset table In the 2 nd case, there are two approaches: Find space on a nearby block and slide the records Create an overflow block 4
5
What is an overflow block? It is another block in which we put the records that theoretically belong to this block. In block’s header, there is a pointer to an overflow. 5
6
The usual technique is to put a tombstone in place of the record. This is not the case that we delete the record physically. This is a permanent tombstone until the database is reconstructed. 6
7
Where to put the sign of deletion? If using offset table in the block header, put null in the pointer’s place If using a map table, put null in physical address 7
8
No problem if fixed length records The problems arise for variable length records We have all problems mentioned for insertion and deletion 8
9
If the new record is shorter: Slide down the records to consolidate the free spaces If the new record is longer: Slide down the records to make room Create an overflow block 9
10
10
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.