You build the index by reading through the database account by account, inserting successive (account ID, record number) pairs into the tree as you progress through the file. Given an account ID, retrieval of the corresponding account record is a two-step process. First, you retrieve the data item from the index tree that has the specified account ID. Then, using the record number stored in the index data item, you read the corresponding account record from the database file. The result is an efficient retrieval process that is based on account ID. * Create a program that builds an index tree for the accounts database( Accountants database shown below should be saved in the file accounts.dat). Once the index is built, your program should • Output the account IDs in ascending order • Read an account ID from the keyboard and output the corresponding account record Record # Account ID First name Last name Balance 0 6274 James Johnson 415.56 1 2843 Marcus Wilson 9217.23 2 4892 Maureen Albright 51462.56 3 8337 Debra Douglas 27.26 4 9523 Bruce Gold 719.32 5 3165 John Carlson 1496.24 6 1892 Mary Smith 918.26 7 3924 Simon Becker 386.85 8 6023 John Edgar 9.65 9 5290 George Truman 16110.68 10 8529 Ellen Fairchild 86.77 11 1144 Donald Williams 4114.26
using c++ plz ...............
You build the index by reading through the
Given an account ID, retrieval of the corresponding account record is a two-step process. First, you retrieve the data item from the index tree that has the specified account ID. Then, using the record number stored in the index data item, you read the corresponding account record from the database file. The result is an efficient retrieval process that is based on account ID.
* Create a program that builds an index tree for the accounts database( Accountants database shown below should be saved in the file accounts.dat). Once the index is built, your program should
• Output the account IDs in ascending order
• Read an account ID from the keyboard and output the corresponding account record
Record # Account ID First name Last name Balance
0 6274 James Johnson 415.56
1 2843 Marcus Wilson 9217.23
2 4892 Maureen Albright 51462.56
3 8337 Debra Douglas 27.26
4 9523 Bruce Gold 719.32
5 3165 John Carlson 1496.24
6 1892 Mary Smith 918.26
7 3924 Simon Becker 386.85
8 6023 John Edgar 9.65
9 5290 George Truman 16110.68
10 8529 Ellen Fairchild 86.77
11 1144 Donald Williams 4114.26
Trending now
This is a popular solution!
Step by step
Solved in 2 steps