C/C++: How to store data in a file in B tree -
It appears that one way of storing data in a B-tree, efficiency as a file with C File can be done with the sequence of strokes (array), representing one representative of each node. In this way a personal nodes can be linked to that approach which is similar to the formation of linked lists using ARAS. But then the problems that would have to be removed from one node, it is not possible to delete only a few bytes in the middle of a large file.
One way to remove 'may be to keep an empty track' nodes until it reaches a threshold cutoff and then create another file that will discard the empty node but it is tedious.
Is there a better approach than simplicity / efficiency approach to removing or removing B-trees in the file?
TIA, -Vijaya
I did a very quick search and dug it up: C source: - This disk-based B-tree style database - although taking a look at "delete.c" it seemed that if you remove one node, everything will be taken down - if it is the right behavior So it looks like something that can help?
In addition - B-trees are often used in file systems - can not you see some file system codes?
My own inclination is of a file system - if you have a fixed-size B-tree, whenever you "delete" a node instead of attempting to delete the reference, just set the value that There is nothing in your code too. After that, there is a clean up thread running, which checks if a file opens to read and if all becomes silent then block the file and blocks.
Comments
Post a Comment