Answer the question
In order to leave comments, you need to log in
How to organize the work of b-tree structure, data file and index file?
There is a ready-made b-tree in C++. There are insert, delete and search functions.
You must do the following:
1. The data element stored in the file is a record that has a unique key value.
2. A record in a file is represented by an index, i.e. pair (k,p), where k is a key value, p is a file pointer to the start of a record in the file.
3. The index file structure specified in the job option is supported for the data file.
4. The index file has a page structure. Pages contain indexes of records and have a fixed size.
5. Reading and writing to the index file is carried out page by page.
6. Testing of the file structure is carried out for various values of the parameters:
N is the number of records in the data file, N = 103, 104, 105, 106,
M is the number of indexes on the page of the index file, M = 10,100, 1000.
7. The number of accesses to blocks of the index file in the process of performing operations must correspond to: for the B-tree of the file - 2 + logt (N/M), where t is the power of B - tree.
Question. How to organize the work of b-tree structure, data file and index file?
Answer the question
In order to leave comments, you need to log in
There is a search, insertion and deletion.
Now we need to organize the work with files. Index file and data file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question