Initialy the heap file has:
The heap header has a "next id" field. The "next id" field contains the next usable data record identifier value.
When a new data record is added it has the "next id" value as identifier, then the "next id" is
incremented by 1.
The heap file size is increased to store the data
record.
initial file state |
final file state |
Since there is no free area in the file a new data record is added.
The nes data record identifier has the "next id" value as identifier, then the "next id" is
incremented by 1.
The heap file size
is increased to store the data record.
initial file state |
final file state |
Since there is no free area in the file a new data record is added.
The nes data record identifier has the "next id" value as identifier, then the "next id" is
incremented by 1.
The heap file size
is increased to store the data record.
initial file state |
final file state |
A free area replace the previous data record.
The heap file
size keep unchanged.
initial file state |
final file state |
A free area replace the previous data record merging with
adjacent
free area
The heap file size keep unchanged.
initial file state |
final file state |
Current next identifier value is used for new data record,
then
current next identifier value is incremented by 1
The heap file
size keep unchanged since free area is large enough to contains new
data record.
The free area is reduce to its previous size
minus the new data record size.
initial file state |
final file state |
© 2007-2011, joafip